@serenity-js/playwright-test 3.41.1 → 3.42.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/CHANGELOG.md +22 -0
- package/esm/api/PerformActivitiesAsPlaywrightSteps.d.ts +14 -0
- package/esm/api/PerformActivitiesAsPlaywrightSteps.d.ts.map +1 -0
- package/esm/api/PerformActivitiesAsPlaywrightSteps.js +40 -0
- package/esm/api/PerformActivitiesAsPlaywrightSteps.js.map +1 -0
- package/esm/api/PlaywrightTestConfig.d.ts +42 -0
- package/esm/api/PlaywrightTestConfig.d.ts.map +1 -0
- package/esm/api/PlaywrightTestConfig.js +2 -0
- package/esm/api/PlaywrightTestConfig.js.map +1 -0
- package/esm/api/WorkerEventStreamReader.d.ts +13 -0
- package/esm/api/WorkerEventStreamReader.d.ts.map +1 -0
- package/esm/api/WorkerEventStreamReader.js +18 -0
- package/esm/api/WorkerEventStreamReader.js.map +1 -0
- package/esm/api/WorkerEventStreamWriter.d.ts +24 -0
- package/esm/api/WorkerEventStreamWriter.d.ts.map +1 -0
- package/esm/api/WorkerEventStreamWriter.js +79 -0
- package/esm/api/WorkerEventStreamWriter.js.map +1 -0
- package/esm/api/index.d.ts +4 -0
- package/esm/api/index.d.ts.map +1 -0
- package/esm/api/index.js +4 -0
- package/esm/api/index.js.map +1 -0
- package/esm/api/serenity-fixtures.d.ts +452 -0
- package/esm/api/serenity-fixtures.d.ts.map +1 -0
- package/esm/api/serenity-fixtures.js +2 -0
- package/esm/api/serenity-fixtures.js.map +1 -0
- package/esm/api/test-api.d.ts +387 -0
- package/esm/api/test-api.d.ts.map +1 -0
- package/esm/api/test-api.js +521 -0
- package/esm/api/test-api.js.map +1 -0
- package/esm/events/EventFactory.d.ts +16 -0
- package/esm/events/EventFactory.d.ts.map +1 -0
- package/esm/events/EventFactory.js +90 -0
- package/esm/events/EventFactory.js.map +1 -0
- package/esm/events/PlaywrightSceneId.d.ts +7 -0
- package/esm/events/PlaywrightSceneId.d.ts.map +1 -0
- package/esm/events/PlaywrightSceneId.js +15 -0
- package/esm/events/PlaywrightSceneId.js.map +1 -0
- package/esm/events/index.d.ts +3 -0
- package/esm/events/index.d.ts.map +1 -0
- package/esm/events/index.js +3 -0
- package/esm/events/index.js.map +1 -0
- package/esm/index.d.ts +3 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +3 -0
- package/esm/index.js.map +1 -0
- package/esm/reporter/PlaywrightErrorParser.d.ts +7 -0
- package/esm/reporter/PlaywrightErrorParser.d.ts.map +1 -0
- package/esm/reporter/PlaywrightErrorParser.js +23 -0
- package/esm/reporter/PlaywrightErrorParser.js.map +1 -0
- package/esm/reporter/PlaywrightEventBuffer.d.ts +25 -0
- package/esm/reporter/PlaywrightEventBuffer.d.ts.map +1 -0
- package/esm/reporter/PlaywrightEventBuffer.js +143 -0
- package/esm/reporter/PlaywrightEventBuffer.js.map +1 -0
- package/esm/reporter/PlaywrightStepReporter.d.ts +14 -0
- package/esm/reporter/PlaywrightStepReporter.d.ts.map +1 -0
- package/esm/reporter/PlaywrightStepReporter.js +38 -0
- package/esm/reporter/PlaywrightStepReporter.js.map +1 -0
- package/esm/reporter/PlaywrightTestSceneIdFactory.d.ts +8 -0
- package/esm/reporter/PlaywrightTestSceneIdFactory.d.ts.map +1 -0
- package/esm/reporter/PlaywrightTestSceneIdFactory.js +11 -0
- package/esm/reporter/PlaywrightTestSceneIdFactory.js.map +1 -0
- package/esm/reporter/SerenityReporterForPlaywrightTest.d.ts +58 -0
- package/esm/reporter/SerenityReporterForPlaywrightTest.d.ts.map +1 -0
- package/esm/reporter/SerenityReporterForPlaywrightTest.js +112 -0
- package/esm/reporter/SerenityReporterForPlaywrightTest.js.map +1 -0
- package/esm/reporter/index.d.ts +3 -0
- package/esm/reporter/index.d.ts.map +1 -0
- package/esm/reporter/index.js +3 -0
- package/esm/reporter/index.js.map +1 -0
- package/lib/api/PerformActivitiesAsPlaywrightSteps.d.ts +1 -1
- package/lib/api/PerformActivitiesAsPlaywrightSteps.d.ts.map +1 -1
- package/lib/api/PerformActivitiesAsPlaywrightSteps.js +2 -2
- package/lib/api/PerformActivitiesAsPlaywrightSteps.js.map +1 -1
- package/lib/api/PlaywrightTestConfig.d.ts +1 -1
- package/lib/api/PlaywrightTestConfig.d.ts.map +1 -1
- package/lib/api/WorkerEventStreamReader.d.ts +1 -1
- package/lib/api/WorkerEventStreamReader.d.ts.map +1 -1
- package/lib/api/WorkerEventStreamReader.js +1 -1
- package/lib/api/WorkerEventStreamReader.js.map +1 -1
- package/lib/api/WorkerEventStreamWriter.d.ts +2 -2
- package/lib/api/WorkerEventStreamWriter.d.ts.map +1 -1
- package/lib/api/WorkerEventStreamWriter.js +1 -1
- package/lib/api/WorkerEventStreamWriter.js.map +1 -1
- package/lib/api/index.d.ts +3 -3
- package/lib/api/index.d.ts.map +1 -1
- package/lib/api/index.js +3 -3
- package/lib/api/index.js.map +1 -1
- package/lib/api/test-api.d.ts +3 -3
- package/lib/api/test-api.d.ts.map +1 -1
- package/lib/api/test-api.js +12 -12
- package/lib/api/test-api.js.map +1 -1
- package/lib/events/EventFactory.d.ts +3 -3
- package/lib/events/EventFactory.d.ts.map +1 -1
- package/lib/events/EventFactory.js +6 -6
- package/lib/events/EventFactory.js.map +1 -1
- package/lib/events/PlaywrightSceneId.d.ts +1 -1
- package/lib/events/PlaywrightSceneId.d.ts.map +1 -1
- package/lib/events/PlaywrightSceneId.js +1 -1
- package/lib/events/PlaywrightSceneId.js.map +1 -1
- package/lib/events/index.d.ts +2 -2
- package/lib/events/index.d.ts.map +1 -1
- package/lib/events/index.js +2 -2
- package/lib/events/index.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -0
- package/lib/reporter/PlaywrightEventBuffer.d.ts +1 -1
- package/lib/reporter/PlaywrightEventBuffer.d.ts.map +1 -1
- package/lib/reporter/PlaywrightEventBuffer.js +12 -12
- package/lib/reporter/PlaywrightEventBuffer.js.map +1 -1
- package/lib/reporter/PlaywrightStepReporter.d.ts +1 -1
- package/lib/reporter/PlaywrightStepReporter.d.ts.map +1 -1
- package/lib/reporter/PlaywrightStepReporter.js +2 -2
- package/lib/reporter/PlaywrightStepReporter.js.map +1 -1
- package/lib/reporter/PlaywrightTestSceneIdFactory.d.ts +2 -2
- package/lib/reporter/PlaywrightTestSceneIdFactory.d.ts.map +1 -1
- package/lib/reporter/PlaywrightTestSceneIdFactory.js +1 -1
- package/lib/reporter/PlaywrightTestSceneIdFactory.js.map +1 -1
- package/lib/reporter/SerenityReporterForPlaywrightTest.d.ts +1 -1
- package/lib/reporter/SerenityReporterForPlaywrightTest.d.ts.map +1 -1
- package/lib/reporter/SerenityReporterForPlaywrightTest.js +8 -8
- package/lib/reporter/SerenityReporterForPlaywrightTest.js.map +1 -1
- package/lib/reporter/index.d.ts +2 -2
- package/lib/reporter/index.d.ts.map +1 -1
- package/lib/reporter/index.js +2 -2
- package/lib/reporter/index.js.map +1 -1
- package/package.json +58 -10
- package/src/api/PerformActivitiesAsPlaywrightSteps.ts +2 -2
- package/src/api/PlaywrightTestConfig.ts +1 -1
- package/src/api/WorkerEventStreamReader.ts +2 -2
- package/src/api/WorkerEventStreamWriter.ts +2 -2
- package/src/api/index.ts +3 -3
- package/src/api/test-api.ts +8 -8
- package/src/events/EventFactory.ts +5 -5
- package/src/events/PlaywrightSceneId.ts +1 -1
- package/src/events/index.ts +2 -2
- package/src/index.ts +2 -2
- package/src/reporter/PlaywrightEventBuffer.ts +8 -8
- package/src/reporter/PlaywrightStepReporter.ts +4 -4
- package/src/reporter/PlaywrightTestSceneIdFactory.ts +2 -2
- package/src/reporter/SerenityReporterForPlaywrightTest.ts +6 -6
- package/src/reporter/index.ts +2 -2
- package/tsconfig-cjs.build.json +18 -0
- package/tsconfig-esm.build.json +18 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CorrelationIdFactory } from '@serenity-js/core/
|
|
2
|
-
import { CorrelationId } from '@serenity-js/core/
|
|
1
|
+
import type { CorrelationIdFactory } from '@serenity-js/core/model';
|
|
2
|
+
import { CorrelationId } from '@serenity-js/core/model';
|
|
3
3
|
export declare class PlaywrightTestSceneIdFactory implements CorrelationIdFactory {
|
|
4
4
|
private testId;
|
|
5
5
|
setTestId(testId: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightTestSceneIdFactory.d.ts","sourceRoot":"","sources":["../../src/reporter/PlaywrightTestSceneIdFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PlaywrightTestSceneIdFactory.d.ts","sourceRoot":"","sources":["../../src/reporter/PlaywrightTestSceneIdFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,qBAAa,4BAA6B,YAAW,oBAAoB;IACrE,OAAO,CAAC,MAAM,CAAgB;IAE9B,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B,MAAM,IAAI,aAAa;CAG1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PlaywrightTestSceneIdFactory = void 0;
|
|
4
|
-
const model_1 = require("@serenity-js/core/
|
|
4
|
+
const model_1 = require("@serenity-js/core/model");
|
|
5
5
|
class PlaywrightTestSceneIdFactory {
|
|
6
6
|
testId;
|
|
7
7
|
setTestId(testId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightTestSceneIdFactory.js","sourceRoot":"","sources":["../../src/reporter/PlaywrightTestSceneIdFactory.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"PlaywrightTestSceneIdFactory.js","sourceRoot":"","sources":["../../src/reporter/PlaywrightTestSceneIdFactory.ts"],"names":[],"mappings":";;;AACA,mDAAwD;AAExD,MAAa,4BAA4B;IAC7B,MAAM,CAAgB;IAE9B,SAAS,CAAC,MAAc;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;CACJ;AAVD,oEAUC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FullConfig } from '@playwright/test';
|
|
2
2
|
import type { FullResult, Reporter, Suite, TestCase, TestError, TestResult } from '@playwright/test/reporter';
|
|
3
3
|
import type { ClassDescription, StageCrewMember, StageCrewMemberBuilder } from '@serenity-js/core';
|
|
4
|
-
import type { OutputStream } from '@serenity-js/core/
|
|
4
|
+
import type { OutputStream } from '@serenity-js/core/adapter';
|
|
5
5
|
/**
|
|
6
6
|
* Configuration object accepted by `@serenity-js/playwright-test` reporter.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SerenityReporterForPlaywrightTest.d.ts","sourceRoot":"","sources":["../../src/reporter/SerenityReporterForPlaywrightTest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAG,MAAM,2BAA2B,CAAC;AAC/G,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEnG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"SerenityReporterForPlaywrightTest.d.ts","sourceRoot":"","sources":["../../src/reporter/SerenityReporterForPlaywrightTest.ts"],"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KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IA2ClD,aAAa,IAAI,OAAO;CAG3B"}
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SerenityReporterForPlaywrightTest = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const events_1 = require("@serenity-js/core/
|
|
6
|
-
const model_1 = require("@serenity-js/core/
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
5
|
+
const events_1 = require("@serenity-js/core/events");
|
|
6
|
+
const model_1 = require("@serenity-js/core/model");
|
|
7
|
+
const PlaywrightErrorParser_js_1 = require("./PlaywrightErrorParser.js");
|
|
8
|
+
const PlaywrightEventBuffer_js_1 = require("./PlaywrightEventBuffer.js");
|
|
9
|
+
const PlaywrightTestSceneIdFactory_js_1 = require("./PlaywrightTestSceneIdFactory.js");
|
|
10
10
|
/**
|
|
11
11
|
* Serenity/JS reporter that receives notifications from Playwright Test and emits them as
|
|
12
12
|
* Serenity/JS [Serenity/JS domain events](https://serenity-js.org/api/core-events/class/DomainEvent/) which can be used by
|
|
13
13
|
* Serenity/JS [stage crew members](https://serenity-js.org/api/core/interface/StageCrewMember/).
|
|
14
14
|
*/
|
|
15
15
|
class SerenityReporterForPlaywrightTest {
|
|
16
|
-
errorParser = new
|
|
16
|
+
errorParser = new PlaywrightErrorParser_js_1.PlaywrightErrorParser();
|
|
17
17
|
sceneIdFactory;
|
|
18
18
|
serenity;
|
|
19
19
|
unhandledError;
|
|
20
|
-
eventBuffer = new
|
|
20
|
+
eventBuffer = new PlaywrightEventBuffer_js_1.PlaywrightEventBuffer();
|
|
21
21
|
suiteTestCounts = new Map();
|
|
22
22
|
/**
|
|
23
23
|
* @param config
|
|
24
24
|
*/
|
|
25
25
|
constructor(config) {
|
|
26
|
-
this.sceneIdFactory = new
|
|
26
|
+
this.sceneIdFactory = new PlaywrightTestSceneIdFactory_js_1.PlaywrightTestSceneIdFactory();
|
|
27
27
|
this.serenity = new core_1.Serenity(new core_1.Clock(), process.cwd(), this.sceneIdFactory);
|
|
28
28
|
this.serenity.configure(config);
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SerenityReporterForPlaywrightTest.js","sourceRoot":"","sources":["../../src/reporter/SerenityReporterForPlaywrightTest.ts"],"names":[],"mappings":";;;AAGA,4CAAyE;AAEzE,
|
|
1
|
+
{"version":3,"file":"SerenityReporterForPlaywrightTest.js","sourceRoot":"","sources":["../../src/reporter/SerenityReporterForPlaywrightTest.ts"],"names":[],"mappings":";;;AAGA,4CAAyE;AAEzE,qDAA2F;AAC3F,mDAAyF;AAEzF,yEAAmE;AACnE,yEAAmE;AACnE,uFAAiF;AAkCjF;;;;GAIG;AACH,MAAa,iCAAiC;IACzB,WAAW,GAAG,IAAI,gDAAqB,EAAE,CAAC;IAE1C,cAAc,CAA+B;IAC7C,QAAQ,CAAW;IAC5B,cAAc,CAAS;IAEd,WAAW,GAA0B,IAAI,gDAAqB,EAAE,CAAC;IACjE,eAAe,GAAG,IAAI,GAAG,EAAiB,CAAC;IAE5D;;OAEG;IACH,YAAY,MAA+C;QACvD,IAAI,CAAC,cAAc,GAAG,IAAI,8DAA4B,EAAE,CAAC;QAEzD,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAQ,CACxB,IAAI,YAAK,EAAE,EACX,OAAO,CAAC,GAAG,EAAE,EACb,IAAI,CAAC,cAAc,CACtB,CAAA;QACD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CAAC,MAAkB,EAAE,KAAY;QACpC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,sBAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE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IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC;QAE3D,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAClB,GAAG,cAAc,CACpB,CAAC;QAEF,MAAM,YAAY,GAAG,eAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC9E,MAAM,OAAO,GAAG,IAAI,gBAAS,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAEvE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,wBAAe,CAAC,OAAO,CAAC,CAAC,CAAC;QAErD,IAAI,CAAC;YACD,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC;YAErC,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc;gBAC/B,CAAC,CAAC,IAAI,gCAAwB,CAAC,IAAI,CAAC,cAAc,CAAC;gBACnD,CAAC,CAAC,IAAI,2BAAmB,EAAE,CAAC;YAEhC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAClB,IAAI,wBAAe,CACf,OAAO,EACP,OAAO,CACV,CACJ,CAAC;QACN,CAAC;QACD,OAAO,KAAK,EAAE,CAAC;YACX,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAClB,IAAI,wBAAe,CACf,IAAI,gCAAwB,CAAC,KAAK,CAAC,EACnC,OAAO,CACV,CACJ,CAAC;YAEF,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;IAED,wCAAwC;IACxC,yCAAyC;IACzC,yCAAyC;IAEzC,aAAa;QACT,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAtJD,8EAsJC"}
|
package/lib/reporter/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './PlaywrightStepReporter';
|
|
2
|
-
export * from './SerenityReporterForPlaywrightTest';
|
|
1
|
+
export * from './PlaywrightStepReporter.js';
|
|
2
|
+
export * from './SerenityReporterForPlaywrightTest.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC"}
|
package/lib/reporter/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./PlaywrightStepReporter"), exports);
|
|
18
|
-
__exportStar(require("./SerenityReporterForPlaywrightTest"), exports);
|
|
17
|
+
__exportStar(require("./PlaywrightStepReporter.js"), exports);
|
|
18
|
+
__exportStar(require("./SerenityReporterForPlaywrightTest.js"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,yEAAuD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/playwright-test",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.42.0",
|
|
4
4
|
"description": "Serenity/JS test runner adapter for Playwright Test, combining Playwright's developer experience with the advanced reporting and automation capabilities of Serenity/JS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -16,8 +16,52 @@
|
|
|
16
16
|
"access": "public",
|
|
17
17
|
"provenance": true
|
|
18
18
|
},
|
|
19
|
-
"main": "lib/index.js",
|
|
19
|
+
"main": "./lib/index.js",
|
|
20
20
|
"types": "./lib/index.d.ts",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"module": "./esm/index.js",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./esm/index.d.ts",
|
|
26
|
+
"import": "./esm/index.js",
|
|
27
|
+
"require": "./lib/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./events": {
|
|
30
|
+
"types": "./lib/events/index.d.ts",
|
|
31
|
+
"import": "./esm/events/index.js",
|
|
32
|
+
"require": "./lib/events/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./reporter": {
|
|
35
|
+
"types": "./lib/reporter/index.d.ts",
|
|
36
|
+
"import": "./esm/reporter/index.js",
|
|
37
|
+
"require": "./lib/reporter/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./api": {
|
|
40
|
+
"types": "./lib/api/index.d.ts",
|
|
41
|
+
"import": "./esm/api/index.js",
|
|
42
|
+
"require": "./lib/api/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./lib/events": {
|
|
45
|
+
"types": "./lib/events/index.d.ts",
|
|
46
|
+
"import": "./esm/events/index.js",
|
|
47
|
+
"require": "./lib/events/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./lib/reporter": {
|
|
50
|
+
"types": "./lib/reporter/index.d.ts",
|
|
51
|
+
"import": "./esm/reporter/index.js",
|
|
52
|
+
"require": "./lib/reporter/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./lib/api": {
|
|
55
|
+
"types": "./lib/api/index.d.ts",
|
|
56
|
+
"import": "./esm/api/index.js",
|
|
57
|
+
"require": "./lib/api/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./lib/*.js": "./lib/*.js",
|
|
60
|
+
"./lib/*": "./lib/*",
|
|
61
|
+
"./esm/*.js": "./esm/*.js",
|
|
62
|
+
"./esm/*": "./esm/*.js",
|
|
63
|
+
"./package.json": "./package.json"
|
|
64
|
+
},
|
|
21
65
|
"keywords": [
|
|
22
66
|
"automation",
|
|
23
67
|
"browser",
|
|
@@ -45,7 +89,11 @@
|
|
|
45
89
|
"clean": "rimraf target",
|
|
46
90
|
"~test": "c8 npm run test:no-coverage",
|
|
47
91
|
"~test:no-coverage": "playwright test",
|
|
48
|
-
"compile": "
|
|
92
|
+
"compile": "npm run compile:clean && npm run compile:esm && npm run compile:cjs-package && npm run compile:cjs",
|
|
93
|
+
"compile:clean": "rimraf lib esm",
|
|
94
|
+
"compile:esm": "tsc --project tsconfig-esm.build.json",
|
|
95
|
+
"compile:cjs-package": "node -e \"require('fs').mkdirSync('lib', { recursive: true }); require('fs').writeFileSync('lib/package.json', '{ \\\"type\\\": \\\"commonjs\\\" }')\"",
|
|
96
|
+
"compile:cjs": "tsc --project tsconfig-cjs.build.json"
|
|
49
97
|
},
|
|
50
98
|
"repository": {
|
|
51
99
|
"type": "git",
|
|
@@ -59,13 +107,13 @@
|
|
|
59
107
|
"node": "^20 || ^22 || ^24"
|
|
60
108
|
},
|
|
61
109
|
"dependencies": {
|
|
62
|
-
"@serenity-js/core": "3.
|
|
63
|
-
"@serenity-js/playwright": "3.
|
|
64
|
-
"@serenity-js/rest": "3.
|
|
65
|
-
"@serenity-js/web": "3.
|
|
66
|
-
"axios": "1.13.
|
|
110
|
+
"@serenity-js/core": "3.42.0",
|
|
111
|
+
"@serenity-js/playwright": "3.42.0",
|
|
112
|
+
"@serenity-js/rest": "3.42.0",
|
|
113
|
+
"@serenity-js/web": "3.42.0",
|
|
114
|
+
"axios": "1.13.6",
|
|
67
115
|
"deepmerge": "4.3.1",
|
|
68
|
-
"tiny-types": "
|
|
116
|
+
"tiny-types": "2.0.5"
|
|
69
117
|
},
|
|
70
118
|
"peerDependencies": {
|
|
71
119
|
"@playwright/test": "~1.58.2"
|
|
@@ -81,5 +129,5 @@
|
|
|
81
129
|
"ts-node": "10.9.2",
|
|
82
130
|
"typescript": "5.9.3"
|
|
83
131
|
},
|
|
84
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "a415b0066807d7bab9f34b1ceef66a26156aafe1"
|
|
85
133
|
}
|
|
@@ -6,8 +6,8 @@ import type {
|
|
|
6
6
|
UsesAbilities
|
|
7
7
|
} from '@serenity-js/core';
|
|
8
8
|
import { d, Interaction, PerformActivities } from '@serenity-js/core';
|
|
9
|
-
import type { EmitsDomainEvents } from '@serenity-js/core/
|
|
10
|
-
import { significantFieldsOf } from 'tiny-types/lib/objects';
|
|
9
|
+
import type { EmitsDomainEvents } from '@serenity-js/core/events';
|
|
10
|
+
import { significantFieldsOf } from 'tiny-types/lib/objects/significantFields.js';
|
|
11
11
|
|
|
12
12
|
export class PerformActivitiesAsPlaywrightSteps extends PerformActivities {
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PlaywrightTestConfig as BasePlaywrightTestConfig } from '@playwright/test';
|
|
2
2
|
|
|
3
|
-
import type { SerenityFixtures, SerenityWorkerFixtures } from './serenity-fixtures';
|
|
3
|
+
import type { SerenityFixtures, SerenityWorkerFixtures } from './serenity-fixtures.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Convenience alias for [PlaywrightTestConfig](https://playwright.dev/docs/test-configuration) object
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
|
|
3
|
-
import type { DomainEvent } from '@serenity-js/core/
|
|
4
|
-
import * as events from '@serenity-js/core/
|
|
3
|
+
import type { DomainEvent } from '@serenity-js/core/events';
|
|
4
|
+
import * as events from '@serenity-js/core/events';
|
|
5
5
|
import type { JSONObject } from 'tiny-types';
|
|
6
6
|
|
|
7
7
|
export class WorkerEventStreamReader {
|
|
@@ -5,8 +5,8 @@ import { type WorkerInfo } from '@playwright/test';
|
|
|
5
5
|
import type { TestCase } from '@playwright/test/reporter';
|
|
6
6
|
import type { Stage, StageCrewMember } from '@serenity-js/core';
|
|
7
7
|
import { LogicError } from '@serenity-js/core';
|
|
8
|
-
import type { DomainEvent } from '@serenity-js/core/
|
|
9
|
-
import { CorrelationId } from '@serenity-js/core/
|
|
8
|
+
import type { DomainEvent } from '@serenity-js/core/events';
|
|
9
|
+
import { CorrelationId } from '@serenity-js/core/model';
|
|
10
10
|
import type { JSONObject } from 'tiny-types';
|
|
11
11
|
|
|
12
12
|
export class WorkerEventStreamWriter implements StageCrewMember {
|
package/src/api/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './PlaywrightTestConfig';
|
|
2
|
-
export * from './serenity-fixtures';
|
|
3
|
-
export * from './test-api';
|
|
1
|
+
export * from './PlaywrightTestConfig.js';
|
|
2
|
+
export * from './serenity-fixtures.js';
|
|
3
|
+
export * from './test-api.js';
|
package/src/api/test-api.ts
CHANGED
|
@@ -16,19 +16,19 @@ import type {
|
|
|
16
16
|
import { mergeTests, test as playwrightBaseTest } from '@playwright/test';
|
|
17
17
|
import type { DiffFormatter } from '@serenity-js/core';
|
|
18
18
|
import { AnsiDiffFormatter, Cast, Clock, Duration, Serenity, TakeNotes } from '@serenity-js/core';
|
|
19
|
-
import { SceneFinishes, SceneTagged } from '@serenity-js/core/
|
|
20
|
-
import { BrowserTag, ExecutionSuccessful, PlatformTag } from '@serenity-js/core/
|
|
19
|
+
import { SceneFinishes, SceneTagged } from '@serenity-js/core/events';
|
|
20
|
+
import { BrowserTag, ExecutionSuccessful, PlatformTag } from '@serenity-js/core/model';
|
|
21
21
|
import { BrowseTheWebWithPlaywright, SerenitySelectorEngines } from '@serenity-js/playwright';
|
|
22
22
|
import { CallAnApi } from '@serenity-js/rest';
|
|
23
23
|
import { Photographer, TakePhotosOfFailures } from '@serenity-js/web';
|
|
24
24
|
import { ensure, isFunction, property } from 'tiny-types';
|
|
25
25
|
|
|
26
|
-
import { PlaywrightSceneId } from '../events';
|
|
27
|
-
import { PlaywrightStepReporter, } from '../reporter';
|
|
28
|
-
import { PlaywrightTestSceneIdFactory } from '../reporter/PlaywrightTestSceneIdFactory';
|
|
29
|
-
import { PerformActivitiesAsPlaywrightSteps } from './PerformActivitiesAsPlaywrightSteps';
|
|
30
|
-
import type { SerenityFixtures, SerenityWorkerFixtures } from './serenity-fixtures';
|
|
31
|
-
import { WorkerEventStreamWriter } from './WorkerEventStreamWriter';
|
|
26
|
+
import { PlaywrightSceneId } from '../events/index.js';
|
|
27
|
+
import { PlaywrightStepReporter, } from '../reporter/index.js';
|
|
28
|
+
import { PlaywrightTestSceneIdFactory } from '../reporter/PlaywrightTestSceneIdFactory.js';
|
|
29
|
+
import { PerformActivitiesAsPlaywrightSteps } from './PerformActivitiesAsPlaywrightSteps.js';
|
|
30
|
+
import type { SerenityFixtures, SerenityWorkerFixtures } from './serenity-fixtures.js';
|
|
31
|
+
import { WorkerEventStreamWriter } from './WorkerEventStreamWriter.js';
|
|
32
32
|
|
|
33
33
|
interface SerenityInternalFixtures {
|
|
34
34
|
configureScenarioInternal: void;
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
SceneTagged,
|
|
11
11
|
SceneTemplateDetected,
|
|
12
12
|
TestRunnerDetected
|
|
13
|
-
} from '@serenity-js/core/
|
|
14
|
-
import { FileSystem, FileSystemLocation, Path, RequirementsHierarchy } from '@serenity-js/core/
|
|
15
|
-
import type { Outcome, Tag } from '@serenity-js/core/
|
|
13
|
+
} from '@serenity-js/core/events';
|
|
14
|
+
import { FileSystem, FileSystemLocation, Path, RequirementsHierarchy } from '@serenity-js/core/io';
|
|
15
|
+
import type { Outcome, Tag } from '@serenity-js/core/model';
|
|
16
16
|
import {
|
|
17
17
|
Category,
|
|
18
18
|
Description,
|
|
@@ -21,9 +21,9 @@ import {
|
|
|
21
21
|
ScenarioDetails,
|
|
22
22
|
ScenarioParameters,
|
|
23
23
|
Tags
|
|
24
|
-
} from '@serenity-js/core/
|
|
24
|
+
} from '@serenity-js/core/model';
|
|
25
25
|
|
|
26
|
-
import { PlaywrightSceneId } from './PlaywrightSceneId';
|
|
26
|
+
import { PlaywrightSceneId } from './PlaywrightSceneId.js';
|
|
27
27
|
|
|
28
28
|
export class EventFactory {
|
|
29
29
|
private requirementsHierarchy: RequirementsHierarchy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
|
|
3
3
|
import type { FullProject, TestCase, TestResult } from '@playwright/test/reporter';
|
|
4
|
-
import { CorrelationId } from '@serenity-js/core/
|
|
4
|
+
import { CorrelationId } from '@serenity-js/core/model';
|
|
5
5
|
|
|
6
6
|
export class PlaywrightSceneId extends CorrelationId {
|
|
7
7
|
|
package/src/events/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './EventFactory';
|
|
2
|
-
export * from './PlaywrightSceneId';
|
|
1
|
+
export * from './EventFactory.js';
|
|
2
|
+
export * from './PlaywrightSceneId.js';
|
package/src/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export { SerenityReporterForPlaywrightTest as default, SerenityReporterForPlaywrightTestConfig } from './reporter';
|
|
1
|
+
export * from './api/index.js';
|
|
2
|
+
export { SerenityReporterForPlaywrightTest as default, SerenityReporterForPlaywrightTestConfig } from './reporter/index.js';
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
RetryableSceneDetected,
|
|
10
10
|
SceneFinished,
|
|
11
11
|
SceneTagged
|
|
12
|
-
} from '@serenity-js/core/
|
|
13
|
-
import { Path } from '@serenity-js/core/
|
|
14
|
-
import type { CorrelationId,Outcome } from '@serenity-js/core/
|
|
12
|
+
} from '@serenity-js/core/events';
|
|
13
|
+
import { Path } from '@serenity-js/core/io';
|
|
14
|
+
import type { CorrelationId,Outcome } from '@serenity-js/core/model';
|
|
15
15
|
import {
|
|
16
16
|
ArbitraryTag,
|
|
17
17
|
ExecutionFailedWithAssertionError,
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
ExecutionIgnored,
|
|
20
20
|
ExecutionSkipped,
|
|
21
21
|
ExecutionSuccessful
|
|
22
|
-
} from '@serenity-js/core/
|
|
22
|
+
} from '@serenity-js/core/model';
|
|
23
23
|
import { type JSONObject } from 'tiny-types';
|
|
24
24
|
|
|
25
|
-
import { WorkerEventStreamReader } from '../api/WorkerEventStreamReader';
|
|
26
|
-
import { WorkerEventStreamWriter } from '../api/WorkerEventStreamWriter';
|
|
27
|
-
import { EventFactory, PlaywrightSceneId } from '../events';
|
|
28
|
-
import { PlaywrightErrorParser } from './PlaywrightErrorParser';
|
|
25
|
+
import { WorkerEventStreamReader } from '../api/WorkerEventStreamReader.js';
|
|
26
|
+
import { WorkerEventStreamWriter } from '../api/WorkerEventStreamWriter.js';
|
|
27
|
+
import { EventFactory, PlaywrightSceneId } from '../events/index.js';
|
|
28
|
+
import { PlaywrightErrorParser } from './PlaywrightErrorParser.js';
|
|
29
29
|
|
|
30
30
|
export class PlaywrightEventBuffer {
|
|
31
31
|
private readonly errorParser = new PlaywrightErrorParser();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { TestInfo } from '@playwright/test';
|
|
2
2
|
import type { Stage, StageCrewMember } from '@serenity-js/core';
|
|
3
|
-
import type { DomainEvent } from '@serenity-js/core/
|
|
3
|
+
import type { DomainEvent } from '@serenity-js/core/events';
|
|
4
4
|
import {
|
|
5
5
|
ActivityRelatedArtifactGenerated,
|
|
6
6
|
AsyncOperationAttempted,
|
|
7
7
|
AsyncOperationCompleted,
|
|
8
8
|
SceneTagged,
|
|
9
|
-
} from '@serenity-js/core/
|
|
10
|
-
import type { Tag } from '@serenity-js/core/
|
|
11
|
-
import { BrowserTag, CorrelationId, Description, Name, Photo, PlatformTag } from '@serenity-js/core/
|
|
9
|
+
} from '@serenity-js/core/events';
|
|
10
|
+
import type { Tag } from '@serenity-js/core/model';
|
|
11
|
+
import { BrowserTag, CorrelationId, Description, Name, Photo, PlatformTag } from '@serenity-js/core/model';
|
|
12
12
|
|
|
13
13
|
export class PlaywrightStepReporter implements StageCrewMember {
|
|
14
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CorrelationIdFactory } from '@serenity-js/core/
|
|
2
|
-
import { CorrelationId } from '@serenity-js/core/
|
|
1
|
+
import type { CorrelationIdFactory } from '@serenity-js/core/model';
|
|
2
|
+
import { CorrelationId } from '@serenity-js/core/model';
|
|
3
3
|
|
|
4
4
|
export class PlaywrightTestSceneIdFactory implements CorrelationIdFactory {
|
|
5
5
|
private testId: CorrelationId;
|
|
@@ -2,13 +2,13 @@ import type { FullConfig } from '@playwright/test';
|
|
|
2
2
|
import type { FullResult, Reporter, Suite, TestCase, TestError, TestResult, } from '@playwright/test/reporter';
|
|
3
3
|
import type { ClassDescription, StageCrewMember, StageCrewMemberBuilder } from '@serenity-js/core';
|
|
4
4
|
import { Clock, Duration, Serenity, Timestamp } from '@serenity-js/core';
|
|
5
|
-
import type { OutputStream } from '@serenity-js/core/
|
|
6
|
-
import { TestRunFinished, TestRunFinishes, TestRunStarts } from '@serenity-js/core/
|
|
7
|
-
import { ExecutionFailedWithError, ExecutionSuccessful, } from '@serenity-js/core/
|
|
5
|
+
import type { OutputStream } from '@serenity-js/core/adapter';
|
|
6
|
+
import { TestRunFinished, TestRunFinishes, TestRunStarts } from '@serenity-js/core/events';
|
|
7
|
+
import { ExecutionFailedWithError, ExecutionSuccessful, } from '@serenity-js/core/model';
|
|
8
8
|
|
|
9
|
-
import { PlaywrightErrorParser } from './PlaywrightErrorParser';
|
|
10
|
-
import { PlaywrightEventBuffer } from './PlaywrightEventBuffer';
|
|
11
|
-
import { PlaywrightTestSceneIdFactory } from './PlaywrightTestSceneIdFactory';
|
|
9
|
+
import { PlaywrightErrorParser } from './PlaywrightErrorParser.js';
|
|
10
|
+
import { PlaywrightEventBuffer } from './PlaywrightEventBuffer.js';
|
|
11
|
+
import { PlaywrightTestSceneIdFactory } from './PlaywrightTestSceneIdFactory.js';
|
|
12
12
|
|
|
13
13
|
type HookType = 'beforeAll' | 'afterAll' | 'beforeEach' | 'afterEach';
|
|
14
14
|
|
package/src/reporter/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './PlaywrightStepReporter';
|
|
2
|
-
export * from './SerenityReporterForPlaywrightTest';
|
|
1
|
+
export * from './PlaywrightStepReporter.js';
|
|
2
|
+
export * from './SerenityReporterForPlaywrightTest.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.build.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"moduleResolution": "Node",
|
|
6
|
+
"outDir": "lib",
|
|
7
|
+
"rootDir": "src",
|
|
8
|
+
"target": "es2022",
|
|
9
|
+
"lib": [
|
|
10
|
+
"es2022",
|
|
11
|
+
"dom"
|
|
12
|
+
],
|
|
13
|
+
"skipLibCheck": true
|
|
14
|
+
},
|
|
15
|
+
"include": [
|
|
16
|
+
"src/**/*.ts"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig-esm.options.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "Node20",
|
|
5
|
+
"moduleResolution": "Node16",
|
|
6
|
+
"outDir": "esm",
|
|
7
|
+
"rootDir": "src",
|
|
8
|
+
"target": "es2022",
|
|
9
|
+
"lib": [
|
|
10
|
+
"es2022",
|
|
11
|
+
"dom"
|
|
12
|
+
],
|
|
13
|
+
"skipLibCheck": true
|
|
14
|
+
},
|
|
15
|
+
"include": [
|
|
16
|
+
"src/**/*.ts"
|
|
17
|
+
]
|
|
18
|
+
}
|