allure-playwright 3.15.0 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cjs/index.js +21 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/testplan.js +23 -2
- package/dist/cjs/testplan.js.map +1 -1
- package/dist/esm/index.js +21 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/testplan.js +23 -2
- package/dist/esm/testplan.js.map +1 -1
- package/dist/types/testplan.d.ts +1 -1
- package/package.json +13 -10
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Install Allure Report separately when you want to render the generated `allure-r
|
|
|
42
42
|
- `"allure-playwright": ">=3.12.0"` requires `"@playwright/test": ">=1.62.0"`.
|
|
43
43
|
- To use `"@playwright/test": ">=1.53.0 <1.62.0"`, use `"allure-playwright": "<=3.11.1"`.
|
|
44
44
|
- Linux, macOS, and Windows wherever Playwright Test supports Node.js
|
|
45
|
-
- this repository is validated in CI on Node.js
|
|
45
|
+
- this repository is validated in CI on Node.js 24 and 26
|
|
46
46
|
|
|
47
47
|
## Usage
|
|
48
48
|
|
|
@@ -137,8 +137,8 @@ npx allure open ./allure-report
|
|
|
137
137
|
Enhance the report by utilizing the runtime API:
|
|
138
138
|
|
|
139
139
|
```js
|
|
140
|
-
import { describe, test } from "playwright";
|
|
141
140
|
import * as allure from "allure-js-commons";
|
|
141
|
+
import { describe, test } from "playwright";
|
|
142
142
|
|
|
143
143
|
describe("signing in with a password", () => {
|
|
144
144
|
test("sign in with a valid password", async () => {
|
package/dist/cjs/index.js
CHANGED
|
@@ -82,7 +82,9 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
|
|
|
82
82
|
_defineProperty(this, "pwStepUuid", new WeakMap());
|
|
83
83
|
_defineProperty(this, "testFullNames", new WeakMap());
|
|
84
84
|
_defineProperty(this, "emittedHookGlobalErrorKeys", new Set());
|
|
85
|
-
_defineProperty(this, "testPlan", (0, _reporter.parseTestPlan)(
|
|
85
|
+
_defineProperty(this, "testPlan", (0, _reporter.parseTestPlan)({
|
|
86
|
+
enableExcludedTests: true
|
|
87
|
+
}));
|
|
86
88
|
_defineProperty(this, "replayedBlobCount", 0);
|
|
87
89
|
_defineProperty(this, "activeBlobIndex", void 0);
|
|
88
90
|
this.options = _objectSpread({
|
|
@@ -96,7 +98,7 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
|
|
|
96
98
|
var _preprocess = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref) {
|
|
97
99
|
var suite, testRun, readonlyProjectNames, _iterator, _step, projectSuite, project, _iterator2, _step2, _projectSuite, _project, readonlyProject, _iterator3, _step3, test, metadata, _t, _t2;
|
|
98
100
|
return _regenerator().w(function (_context) {
|
|
99
|
-
while (1) switch (_context.n) {
|
|
101
|
+
while (1) switch (_context.p = _context.n) {
|
|
100
102
|
case 0:
|
|
101
103
|
suite = _ref.suite, testRun = _ref.testRun;
|
|
102
104
|
if (this.testPlan) {
|
|
@@ -757,7 +759,7 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
|
|
|
757
759
|
_this$attachmentTarge2;
|
|
758
760
|
var testUuid, threadId, blob, thread, _test$parent$titlePat, _test$parent$titlePat2, projectSuiteTitle, fileSuiteTitle, suiteTitles, beforeHooksStack, afterHooksStack, targets, targetsByName, _iterator7, _step7, _targetsByName$get, t, q, takeByName, _iterator8, _step8, attachment, isRuntimeMessage, stepInfo, _stepInfo$hookStep$uu2, _stepInfo$hookStep2, message, targetStack, _targetStack, stepUuid, _targetStack2, stepResult, fileName, _t3;
|
|
759
761
|
return _regenerator().w(function (_context3) {
|
|
760
|
-
while (1) switch (_context3.n) {
|
|
762
|
+
while (1) switch (_context3.p = _context3.n) {
|
|
761
763
|
case 0:
|
|
762
764
|
testUuid = this.allureResultsUuids.get(test.id);
|
|
763
765
|
if (testUuid) {
|
|
@@ -772,7 +774,7 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
|
|
|
772
774
|
threadId = result.parallelIndex !== undefined ? result.parallelIndex : result.workerIndex;
|
|
773
775
|
blob = this.activeBlobIndex === undefined ? "" : "-blob-".concat(this.activeBlobIndex);
|
|
774
776
|
thread = "pid-".concat(_nodeProcess["default"].pid).concat(blob, "-worker-").concat(threadId); // only apply default suites if not set by user
|
|
775
|
-
_test$parent$titlePat = test.parent.titlePath(), _test$parent$titlePat2 = _toArray(_test$parent$titlePat), projectSuiteTitle = _test$parent$titlePat2[1], fileSuiteTitle = _test$parent$titlePat2[2], suiteTitles = _test$parent$titlePat2.slice(3);
|
|
777
|
+
_test$parent$titlePat = test.parent.titlePath(), _test$parent$titlePat2 = _toArray(_test$parent$titlePat), projectSuiteTitle = _test$parent$titlePat2[1], fileSuiteTitle = _test$parent$titlePat2[2], suiteTitles = _arrayLikeToArray(_test$parent$titlePat2).slice(3);
|
|
776
778
|
beforeHooksStack = this.beforeHooksStepsStack.get(test.id);
|
|
777
779
|
afterHooksStack = this.afterHooksStepsStack.get(test.id);
|
|
778
780
|
this.allureRuntime.updateTest(testUuid, function (testResult) {
|
|
@@ -1027,7 +1029,7 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
|
|
|
1027
1029
|
var _this3 = this;
|
|
1028
1030
|
var unprocessedCases, _iterator9, _step9, testCase, result, _t4;
|
|
1029
1031
|
return _regenerator().w(function (_context4) {
|
|
1030
|
-
while (1) switch (_context4.n) {
|
|
1032
|
+
while (1) switch (_context4.p = _context4.n) {
|
|
1031
1033
|
case 0:
|
|
1032
1034
|
unprocessedCases = this.suite.allTests().filter(function (testCase) {
|
|
1033
1035
|
var title = testCase.title;
|
|
@@ -1218,20 +1220,31 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
|
|
|
1218
1220
|
key: "isInTestPlan",
|
|
1219
1221
|
value: function isInTestPlan(test) {
|
|
1220
1222
|
var metadata = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getStaticTestMetadata(test);
|
|
1221
|
-
|
|
1223
|
+
var testPlan = this.testPlan;
|
|
1224
|
+
if (!testPlan) {
|
|
1222
1225
|
return true;
|
|
1223
1226
|
}
|
|
1224
1227
|
var fullName = metadata.fullName,
|
|
1225
1228
|
locationFullName = metadata.locationFullName,
|
|
1226
1229
|
legacyFullName = metadata.legacyFullName,
|
|
1227
1230
|
staticAllureId = metadata.staticAllureId;
|
|
1228
|
-
|
|
1231
|
+
var subjects = [{
|
|
1229
1232
|
fullName: locationFullName,
|
|
1230
1233
|
nativeSelector: fullName,
|
|
1231
1234
|
id: staticAllureId
|
|
1232
|
-
}
|
|
1235
|
+
}, {
|
|
1233
1236
|
fullName: legacyFullName,
|
|
1234
1237
|
id: staticAllureId
|
|
1238
|
+
}];
|
|
1239
|
+
var exclusionPlan = _objectSpread(_objectSpread({}, testPlan), {}, {
|
|
1240
|
+
tests: []
|
|
1241
|
+
});
|
|
1242
|
+
return subjects.some(function (subject) {
|
|
1243
|
+
return (0, _reporter.includedInTestPlan)(testPlan, subject);
|
|
1244
|
+
}) && subjects.every(function (subject) {
|
|
1245
|
+
return (0, _reporter.includedInTestPlan)(exclusionPlan, subject, {
|
|
1246
|
+
enableExcludedTests: true
|
|
1247
|
+
});
|
|
1235
1248
|
});
|
|
1236
1249
|
}
|
|
1237
1250
|
}, {
|