Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

allure-playwright

Package Overview
Dependencies
Maintainers
3
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allure-playwright - npm Package Compare versions

Comparing version 3.0.0-beta.4 to 3.0.0-beta.5

35

dist/cjs/index.js

@@ -160,3 +160,4 @@ "use strict";

var project = suite.project();
var relativeFile = _nodePath["default"].relative(project === null || project === void 0 ? void 0 : project.testDir, test.location.file).split(_nodePath["default"].sep).join("/");
var pathElements = _nodePath["default"].relative(project === null || project === void 0 ? void 0 : project.testDir, test.location.file).split(_nodePath["default"].sep);
var relativeFile = pathElements.join("/");
// root > project > file path > test.describe...

@@ -170,3 +171,3 @@ var _suite$titlePath = suite.titlePath(),

name: titleMetadata.cleanTitle,
labels: titleMetadata.labels,
labels: _toConsumableArray(titleMetadata.labels),
links: [],

@@ -189,2 +190,18 @@ parameters: [],

});
result.labels.push({
name: _allureJsCommons.LabelName.PACKAGE,
value: pathElements.join(".")
});
// support for earlier playwright versions
if ("tags" in test) {
var _ref;
var tags = test.tags.map(function (tag) {
return {
name: _allureJsCommons.LabelName.TAG,
value: tag.startsWith("@") ? tag.substring(1) : tag
};
});
(_ref = result.labels).push.apply(_ref, _toConsumableArray(tags));
}
if (project !== null && project !== void 0 && project.name) {

@@ -295,2 +312,12 @@ result.parameters.push({

testResult.statusDetails = _objectSpread({}, (0, _sdk.getMessageAndTraceFromError)(error));
} else {
var _test$annotations;
var skipReason = (_test$annotations = test.annotations) === null || _test$annotations === void 0 || (_test$annotations = _test$annotations.find(function (annotation) {
return annotation.type === "skip" || annotation.type === "fixme";
})) === null || _test$annotations === void 0 ? void 0 : _test$annotations.description;
if (skipReason) {
testResult.statusDetails = _objectSpread(_objectSpread({}, testResult.statusDetails), {}, {
message: skipReason
});
}
}

@@ -368,4 +395,4 @@ testResult.status = (0, _utils.statusToAllureStats)(result.status, test.expectedStatus);

case 0:
unprocessedCases = this.suite.allTests().filter(function (_ref) {
var title = _ref.title;
unprocessedCases = this.suite.allTests().filter(function (_ref2) {
var title = _ref2.title;
var titleMetadata = (0, _sdk.extractMetadataFromString)(title);

@@ -372,0 +399,0 @@ return !_this2.startedTestCasesTitlesCache.includes(titleMetadata.cleanTitle);

@@ -141,3 +141,4 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }

var project = suite.project();
var relativeFile = path.relative(project === null || project === void 0 ? void 0 : project.testDir, test.location.file).split(path.sep).join("/");
var pathElements = path.relative(project === null || project === void 0 ? void 0 : project.testDir, test.location.file).split(path.sep);
var relativeFile = pathElements.join("/");
// root > project > file path > test.describe...

@@ -151,3 +152,3 @@ var _suite$titlePath = suite.titlePath(),

name: titleMetadata.cleanTitle,
labels: titleMetadata.labels,
labels: _toConsumableArray(titleMetadata.labels),
links: [],

@@ -170,2 +171,18 @@ parameters: [],

});
result.labels.push({
name: LabelName.PACKAGE,
value: pathElements.join(".")
});
// support for earlier playwright versions
if ("tags" in test) {
var _ref;
var tags = test.tags.map(function (tag) {
return {
name: LabelName.TAG,
value: tag.startsWith("@") ? tag.substring(1) : tag
};
});
(_ref = result.labels).push.apply(_ref, _toConsumableArray(tags));
}
if (project !== null && project !== void 0 && project.name) {

@@ -276,2 +293,12 @@ result.parameters.push({

testResult.statusDetails = _objectSpread({}, getMessageAndTraceFromError(error));
} else {
var _test$annotations;
var skipReason = (_test$annotations = test.annotations) === null || _test$annotations === void 0 || (_test$annotations = _test$annotations.find(function (annotation) {
return annotation.type === "skip" || annotation.type === "fixme";
})) === null || _test$annotations === void 0 ? void 0 : _test$annotations.description;
if (skipReason) {
testResult.statusDetails = _objectSpread(_objectSpread({}, testResult.statusDetails), {}, {
message: skipReason
});
}
}

@@ -349,4 +376,4 @@ testResult.status = statusToAllureStats(result.status, test.expectedStatus);

case 0:
unprocessedCases = this.suite.allTests().filter(function (_ref) {
var title = _ref.title;
unprocessedCases = this.suite.allTests().filter(function (_ref2) {
var title = _ref2.title;
var titleMetadata = extractMetadataFromString(title);

@@ -353,0 +380,0 @@ return !_this2.startedTestCasesTitlesCache.includes(titleMetadata.cleanTitle);

10

package.json
{
"name": "allure-playwright",
"version": "3.0.0-beta.4",
"version": "3.0.0-beta.5",
"description": "Allure Playwright integration",

@@ -58,3 +58,3 @@ "keywords": [

"dependencies": {
"allure-js-commons": "3.0.0-beta.4"
"allure-js-commons": "3.0.0-beta.5"
},

@@ -67,11 +67,11 @@ "devDependencies": {

"@babel/preset-typescript": "^7.24.6",
"@playwright/test": "^1.34.1",
"@playwright/test": "^1.45.1",
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/eslint": "^8",
"@types/node": "^20.6.3",
"@types/node": "^20.14.2",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"allure-commandline": "^2.29.0",
"allure-vitest": "3.0.0-beta.4",
"allure-vitest": "3.0.0-beta.5",
"eslint": "^8.57.0",

@@ -78,0 +78,0 @@ "eslint-config-prettier": "^9.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc