@serenity-js/playwright-test 3.31.9 → 3.31.12
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 +23 -0
- package/lib/api/SerenityOptions.d.ts +3 -3
- package/lib/api/index.d.ts +0 -2
- package/lib/api/index.d.ts.map +1 -1
- package/lib/api/index.js +0 -2
- package/lib/api/index.js.map +1 -1
- package/lib/api/test-api.d.ts +36 -4
- package/lib/api/test-api.d.ts.map +1 -1
- package/lib/api/test-api.js.map +1 -1
- package/package.json +9 -9
- package/src/api/SerenityOptions.ts +3 -3
- package/src/api/index.ts +0 -2
- package/src/api/test-api.ts +2 -4
- package/lib/api/DescribeFunction.d.ts +0 -235
- package/lib/api/DescribeFunction.d.ts.map +0 -1
- package/lib/api/DescribeFunction.js +0 -3
- package/lib/api/DescribeFunction.js.map +0 -1
- package/lib/api/SuiteFunction.d.ts +0 -62
- package/lib/api/SuiteFunction.d.ts.map +0 -1
- package/lib/api/SuiteFunction.js +0 -3
- package/lib/api/SuiteFunction.js.map +0 -1
- package/src/api/DescribeFunction.ts +0 -233
- package/src/api/SuiteFunction.ts +0 -66
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.31.12](https://github.com/serenity-js/serenity-js/compare/v3.31.11...v3.31.12) (2025-03-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **deps:** update playwright dependencies to v1.51.0 ([81dfdd4](https://github.com/serenity-js/serenity-js/commit/81dfdd4a4514d3f5b90a6c2cda7b54330f4e1d61))
|
|
12
|
+
* **playwright-test:** removed stop-gap type defs since Playwright now provides them correctly ([91d2484](https://github.com/serenity-js/serenity-js/commit/91d2484de8b508f672ac637b3bad121bd0d9487a)), closes [microsoft/playwright#24146](https://github.com/microsoft/playwright/issues/24146)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [3.31.10](https://github.com/serenity-js/serenity-js/compare/v3.31.9...v3.31.10) (2025-03-05)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **deps:** update dependency typescript to v5.8.2 ([228c7fd](https://github.com/serenity-js/serenity-js/commit/228c7fddee3afcbf5015b147eeb816494ef6bd08))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
6
29
|
## [3.31.9](https://github.com/serenity-js/serenity-js/compare/v3.31.8...v3.31.9) (2025-02-20)
|
|
7
30
|
|
|
8
31
|
**Note:** Version bump only for package @serenity-js/playwright-test
|
|
@@ -79,7 +79,7 @@ import type { PlaywrightOptions } from '@serenity-js/playwright';
|
|
|
79
79
|
*/
|
|
80
80
|
export interface SerenityOptions {
|
|
81
81
|
/**
|
|
82
|
-
* Configures the [`Cast`](https://serenity-js.org/api/core/class/Cast/) of [`
|
|
82
|
+
* Configures the [`Cast`](https://serenity-js.org/api/core/class/Cast/) of [`actors`](https://serenity-js.org/api/core/class/SerenityConfig/#actors) to be used when injecting an [`actor`](https://serenity-js.org/api/playwright-test/interface/SerenityFixtures/#actor)
|
|
83
83
|
* or invoking [`actorCalled`](https://serenity-js.org/api/playwright-test/interface/SerenityFixtures/#actorCalled) in a [test scenario](https://serenity-js.org/api/playwright-test/function/it/).
|
|
84
84
|
*
|
|
85
85
|
* :::info Did you know?
|
|
@@ -152,7 +152,7 @@ export interface SerenityOptions {
|
|
|
152
152
|
*/
|
|
153
153
|
defaultActorName: string;
|
|
154
154
|
/**
|
|
155
|
-
* Configures the [
|
|
155
|
+
* Configures the [stage crew members](https://serenity-js.org/api/core/class/SerenityConfig/#crew)
|
|
156
156
|
* to be instantiated in Playwright Test worker processes.
|
|
157
157
|
*
|
|
158
158
|
* :::info Did you know?
|
|
@@ -184,7 +184,7 @@ export interface SerenityOptions {
|
|
|
184
184
|
*/
|
|
185
185
|
crew: Array<ClassDescription | StageCrewMember | StageCrewMemberBuilder>;
|
|
186
186
|
/**
|
|
187
|
-
* Sets the [`
|
|
187
|
+
* Sets the [`cueTimeout`](https://serenity-js.org/api/core/class/SerenityConfig/#cueTimeout) to a given [duration](https://serenity-js.org/api/core/class/Duration/) or a numeric value in milliseconds.
|
|
188
188
|
* Defaults to **5 seconds**.
|
|
189
189
|
*
|
|
190
190
|
* #### Learn more
|
package/lib/api/index.d.ts
CHANGED
package/lib/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
package/lib/api/index.js
CHANGED
|
@@ -14,10 +14,8 @@ 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("./DescribeFunction"), exports);
|
|
18
17
|
__exportStar(require("./PlaywrightTestConfig"), exports);
|
|
19
18
|
__exportStar(require("./SerenityFixtures"), exports);
|
|
20
19
|
__exportStar(require("./SerenityOptions"), exports);
|
|
21
|
-
__exportStar(require("./SuiteFunction"), exports);
|
|
22
20
|
__exportStar(require("./test-api"), exports);
|
|
23
21
|
//# sourceMappingURL=index.js.map
|
package/lib/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,qDAAmC;AACnC,oDAAkC;AAClC,6CAA2B"}
|
package/lib/api/test-api.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { Expect, Fixtures, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, TestInfo, TestType } from '@playwright/test';
|
|
2
|
-
import type { DescribeFunction } from './DescribeFunction';
|
|
3
2
|
import type { SerenityFixtures } from './SerenityFixtures';
|
|
4
3
|
import type { SerenityOptions } from './SerenityOptions';
|
|
5
4
|
export declare const fixtures: Fixtures<Omit<SerenityOptions, 'actors'> & SerenityFixtures, object, PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
|
|
6
5
|
/**
|
|
7
6
|
* Serenity/JS BDD-style test API created by [`useBase`](https://serenity-js.org/api/playwright-test/function/useBase/).
|
|
8
7
|
*/
|
|
9
|
-
export type TestApi<TestArgs extends Record<string, any>, WorkerArgs extends Record<string, any>> = Pick<TestType<TestArgs, WorkerArgs>, 'beforeAll' | 'beforeEach' | 'afterEach' | 'afterAll' | 'expect'> & {
|
|
8
|
+
export type TestApi<TestArgs extends Record<string, any>, WorkerArgs extends Record<string, any>> = Pick<TestType<TestArgs, WorkerArgs>, 'describe' | 'beforeAll' | 'beforeEach' | 'afterEach' | 'afterAll' | 'expect'> & {
|
|
10
9
|
/**
|
|
11
10
|
* Creates a Serenity/JS BDD-style test API around the default Playwright [base test](https://playwright.dev/docs/test-fixtures)
|
|
12
11
|
* and using custom test fixtures.
|
|
@@ -34,7 +33,6 @@ export type TestApi<TestArgs extends Record<string, any>, WorkerArgs extends Rec
|
|
|
34
33
|
useFixtures: <T extends Record<string, any>, W extends Record<string, any> = object>(customFixtures: Fixtures<T, W, TestArgs, WorkerArgs>) => TestApi<TestArgs & T, WorkerArgs & W>;
|
|
35
34
|
it: TestType<TestArgs, WorkerArgs>;
|
|
36
35
|
test: TestType<TestArgs, WorkerArgs>;
|
|
37
|
-
describe: DescribeFunction;
|
|
38
36
|
};
|
|
39
37
|
/**
|
|
40
38
|
* Declares a single test scenario.
|
|
@@ -146,7 +144,41 @@ export declare const test: TestType<PlaywrightTestArgs & PlaywrightTestOptions &
|
|
|
146
144
|
* - [Playwright Test `describe` function](https://playwright.dev/docs/api/class-test#test-describe-1)
|
|
147
145
|
* - [Serenity/JS + Playwright Test project template](https://github.com/serenity-js/serenity-js-playwright-test-template/)
|
|
148
146
|
*/
|
|
149
|
-
export declare const describe:
|
|
147
|
+
export declare const describe: {
|
|
148
|
+
(title: string, callback: () => void): void;
|
|
149
|
+
(callback: () => void): void;
|
|
150
|
+
(title: string, details: import("@playwright/test").TestDetails, callback: () => void): void;
|
|
151
|
+
only(title: string, callback: () => void): void;
|
|
152
|
+
only(callback: () => void): void;
|
|
153
|
+
only(title: string, details: import("@playwright/test").TestDetails, callback: () => void): void;
|
|
154
|
+
skip(title: string, callback: () => void): void;
|
|
155
|
+
skip(callback: () => void): void;
|
|
156
|
+
skip(title: string, details: import("@playwright/test").TestDetails, callback: () => void): void;
|
|
157
|
+
fixme(title: string, callback: () => void): void;
|
|
158
|
+
fixme(callback: () => void): void;
|
|
159
|
+
fixme(title: string, details: import("@playwright/test").TestDetails, callback: () => void): void;
|
|
160
|
+
serial: {
|
|
161
|
+
(title: string, callback: () => void): void;
|
|
162
|
+
(callback: () => void): void;
|
|
163
|
+
(title: string, details: import("@playwright/test").TestDetails, callback: () => void): void;
|
|
164
|
+
only(title: string, callback: () => void): void;
|
|
165
|
+
only(callback: () => void): void;
|
|
166
|
+
only(title: string, details: import("@playwright/test").TestDetails, callback: () => void): void;
|
|
167
|
+
};
|
|
168
|
+
parallel: {
|
|
169
|
+
(title: string, callback: () => void): void;
|
|
170
|
+
(callback: () => void): void;
|
|
171
|
+
(title: string, details: import("@playwright/test").TestDetails, callback: () => void): void;
|
|
172
|
+
only(title: string, callback: () => void): void;
|
|
173
|
+
only(callback: () => void): void;
|
|
174
|
+
only(title: string, details: import("@playwright/test").TestDetails, callback: () => void): void;
|
|
175
|
+
};
|
|
176
|
+
configure: (options: {
|
|
177
|
+
mode?: "default" | "parallel" | "serial";
|
|
178
|
+
retries?: number;
|
|
179
|
+
timeout?: number;
|
|
180
|
+
}) => void;
|
|
181
|
+
};
|
|
150
182
|
export declare const beforeAll: {
|
|
151
183
|
(inner: (args: PlaywrightTestArgs & PlaywrightTestOptions & Omit<SerenityOptions, "actors"> & SerenityFixtures & PlaywrightWorkerArgs & PlaywrightWorkerOptions & object, testInfo: TestInfo) => Promise<any> | any): void;
|
|
152
184
|
(title: string, inner: (args: PlaywrightTestArgs & PlaywrightTestOptions & Omit<SerenityOptions, "actors"> & SerenityFixtures & PlaywrightWorkerArgs & PlaywrightWorkerOptions & object, testInfo: TestInfo) => Promise<any> | any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-api.d.ts","sourceRoot":"","sources":["../../src/api/test-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,QAAQ,EACR,QAAQ,EACX,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"test-api.d.ts","sourceRoot":"","sources":["../../src/api/test-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,QAAQ,EACR,QAAQ,EACX,MAAM,kBAAkB,CAAC;AAkB1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,M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;;;;;;;;;;GA+CG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAkN68nG,CAAC;eAA4C,CAAC;eAAiB,CAAC;;CAlN9/nG,CAAC;AAErC,eAAO,MAAM,SAAS;;;CAAgB,CAAC;AAEvC,eAAO,MAAM,UAAU;;;CAAiB,CAAC;AAEzC,eAAO,MAAM,SAAS;;;CAAgB,CAAC;AAEvC,eAAO,MAAM,QAAQ;;;CAAe,CAAC;AAErC,eAAO,MAAM,MAAM,EAAE,MAAmB,CAAC;AAEzC,eAAO,MAAM,WAAW,GAnJF,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,iXAmJxC,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyIG;AACH,wBAAgB,OAAO,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EACzG,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,GACzC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,GAAG,gBAAgB,GAAG,QAAQ,EAAE,UAAU,CAAC,CAGpF"}
|
package/lib/api/test-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-api.js","sourceRoot":"","sources":["../../src/api/test-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"test-api.js","sourceRoot":"","sources":["../../src/api/test-api.ts"],"names":[],"mappings":";;;;;;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,CAAC,CAAC;AAClF,CAAC;AAED;;;GAGG;AACH,SAAS,aAAa,CAAC,KAAqC;IAOxD,6EAA6E;IAC7E,2EAA2E;IAC3E,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1D,MAAM,QAAQ,GAAG,WAAW;QACxB,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;QACvB,CAAC,CAAC,IAAI,GAAG,CAAC,UAAW,KAAK,CAAC,MAAO,EAAE,CAAC,CAAC;IAE1C,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI;QACtB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ;QACvB,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE,EAAE;QAC9D,CAAC,CAAC,SAAS,CAAC;IAEhB,OAAO;QACH,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,IAAI;QACJ,IAAI;QACJ,IAAI;KACP,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/playwright-test",
|
|
3
|
-
"version": "3.31.
|
|
3
|
+
"version": "3.31.12",
|
|
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",
|
|
@@ -59,26 +59,26 @@
|
|
|
59
59
|
"node": "^18.12 || ^20 || ^22"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@serenity-js/core": "3.31.
|
|
63
|
-
"@serenity-js/playwright": "3.31.
|
|
64
|
-
"@serenity-js/rest": "3.31.
|
|
65
|
-
"@serenity-js/web": "3.31.
|
|
62
|
+
"@serenity-js/core": "3.31.12",
|
|
63
|
+
"@serenity-js/playwright": "3.31.12",
|
|
64
|
+
"@serenity-js/rest": "3.31.12",
|
|
65
|
+
"@serenity-js/web": "3.31.12",
|
|
66
66
|
"deepmerge": "4.3.1",
|
|
67
67
|
"tiny-types": "1.23.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@playwright/test": "~1.
|
|
70
|
+
"@playwright/test": "~1.51.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@integration/testing-tools": "3.0.0",
|
|
74
|
-
"@playwright/test": "1.
|
|
74
|
+
"@playwright/test": "1.51.0",
|
|
75
75
|
"@types/chai": "4.3.20",
|
|
76
76
|
"@types/mocha": "10.0.10",
|
|
77
77
|
"c8": "10.1.3",
|
|
78
78
|
"mocha": "11.1.0",
|
|
79
79
|
"mocha-multi": "1.1.7",
|
|
80
80
|
"ts-node": "10.9.2",
|
|
81
|
-
"typescript": "5.
|
|
81
|
+
"typescript": "5.8.2"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "196bdd12efc4a03dcb03755faa551989e6e39bfe"
|
|
84
84
|
}
|
|
@@ -81,7 +81,7 @@ import type { PlaywrightOptions } from '@serenity-js/playwright';
|
|
|
81
81
|
export interface SerenityOptions {
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
* Configures the [`Cast`](https://serenity-js.org/api/core/class/Cast/) of [`
|
|
84
|
+
* Configures the [`Cast`](https://serenity-js.org/api/core/class/Cast/) of [`actors`](https://serenity-js.org/api/core/class/SerenityConfig/#actors) to be used when injecting an [`actor`](https://serenity-js.org/api/playwright-test/interface/SerenityFixtures/#actor)
|
|
85
85
|
* or invoking [`actorCalled`](https://serenity-js.org/api/playwright-test/interface/SerenityFixtures/#actorCalled) in a [test scenario](https://serenity-js.org/api/playwright-test/function/it/).
|
|
86
86
|
*
|
|
87
87
|
* :::info Did you know?
|
|
@@ -156,7 +156,7 @@ export interface SerenityOptions {
|
|
|
156
156
|
defaultActorName: string;
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
|
-
* Configures the [
|
|
159
|
+
* Configures the [stage crew members](https://serenity-js.org/api/core/class/SerenityConfig/#crew)
|
|
160
160
|
* to be instantiated in Playwright Test worker processes.
|
|
161
161
|
*
|
|
162
162
|
* :::info Did you know?
|
|
@@ -189,7 +189,7 @@ export interface SerenityOptions {
|
|
|
189
189
|
crew: Array<ClassDescription | StageCrewMember | StageCrewMemberBuilder>;
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
|
-
* Sets the [`
|
|
192
|
+
* Sets the [`cueTimeout`](https://serenity-js.org/api/core/class/SerenityConfig/#cueTimeout) to a given [duration](https://serenity-js.org/api/core/class/Duration/) or a numeric value in milliseconds.
|
|
193
193
|
* Defaults to **5 seconds**.
|
|
194
194
|
*
|
|
195
195
|
* #### Learn more
|
package/src/api/index.ts
CHANGED
package/src/api/test-api.ts
CHANGED
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
PlaywrightStepReporter,
|
|
25
25
|
SERENITY_JS_DOMAIN_EVENTS_ATTACHMENT_CONTENT_TYPE
|
|
26
26
|
} from '../reporter';
|
|
27
|
-
import type { DescribeFunction } from './DescribeFunction';
|
|
28
27
|
import { PerformActivitiesAsPlaywrightSteps } from './PerformActivitiesAsPlaywrightSteps';
|
|
29
28
|
import type { SerenityFixtures } from './SerenityFixtures';
|
|
30
29
|
import type { SerenityOptions } from './SerenityOptions';
|
|
@@ -166,7 +165,7 @@ export const fixtures: Fixtures<Omit<SerenityOptions, 'actors'> & SerenityFixtur
|
|
|
166
165
|
* Serenity/JS BDD-style test API created by [`useBase`](https://serenity-js.org/api/playwright-test/function/useBase/).
|
|
167
166
|
*/
|
|
168
167
|
export type TestApi<TestArgs extends Record<string, any>, WorkerArgs extends Record<string, any>> =
|
|
169
|
-
Pick<TestType<TestArgs, WorkerArgs>, 'beforeAll' | 'beforeEach' | 'afterEach' | 'afterAll' | 'expect'> &
|
|
168
|
+
Pick<TestType<TestArgs, WorkerArgs>, 'describe' | 'beforeAll' | 'beforeEach' | 'afterEach' | 'afterAll' | 'expect'> &
|
|
170
169
|
{
|
|
171
170
|
/**
|
|
172
171
|
* Creates a Serenity/JS BDD-style test API around the default Playwright [base test](https://playwright.dev/docs/test-fixtures)
|
|
@@ -195,7 +194,6 @@ export type TestApi<TestArgs extends Record<string, any>, WorkerArgs extends Rec
|
|
|
195
194
|
useFixtures: <T extends Record<string, any>, W extends Record<string, any> = object>(customFixtures: Fixtures<T, W, TestArgs, WorkerArgs>) => TestApi<TestArgs & T, WorkerArgs & W>,
|
|
196
195
|
it: TestType<TestArgs, WorkerArgs>,
|
|
197
196
|
test: TestType<TestArgs, WorkerArgs>,
|
|
198
|
-
describe: DescribeFunction,
|
|
199
197
|
}
|
|
200
198
|
|
|
201
199
|
function createTestApi<TestArgs extends Record<string, any>, WorkerArgs extends Record<string, any> = object>(baseTest: TestType<TestArgs, WorkerArgs>): TestApi<TestArgs, WorkerArgs> {
|
|
@@ -537,4 +535,4 @@ function asProxyConfig(proxy: PlaywrightTestOptions['proxy']): {
|
|
|
537
535
|
port,
|
|
538
536
|
auth
|
|
539
537
|
};
|
|
540
|
-
}
|
|
538
|
+
}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import type { SuiteFunction } from './SuiteFunction';
|
|
2
|
-
export type DescribeFunction = SuiteFunction & {
|
|
3
|
-
/**
|
|
4
|
-
* Declares a focused group of tests. If there are some focused tests or suites, all of them will be run but nothing
|
|
5
|
-
* else.
|
|
6
|
-
*
|
|
7
|
-
* **Usage**
|
|
8
|
-
*
|
|
9
|
-
* ```js
|
|
10
|
-
* test.describe.only('focused group', () => {
|
|
11
|
-
* test('in the focused group', async ({ page }) => {
|
|
12
|
-
* // This test will run
|
|
13
|
-
* });
|
|
14
|
-
* });
|
|
15
|
-
* test('not in the focused group', async ({ page }) => {
|
|
16
|
-
* // This test will not run
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @param title Group title.
|
|
21
|
-
* @param callback A callback that is run immediately when calling
|
|
22
|
-
* [test.describe.only(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-only). Any tests
|
|
23
|
-
* added in this callback will belong to the group.
|
|
24
|
-
*/
|
|
25
|
-
only: SuiteFunction;
|
|
26
|
-
/**
|
|
27
|
-
* Declares a skipped test group, similarly to
|
|
28
|
-
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1). Tests in the skipped
|
|
29
|
-
* group are never run.
|
|
30
|
-
*
|
|
31
|
-
* **Usage**
|
|
32
|
-
*
|
|
33
|
-
* ```js
|
|
34
|
-
* test.describe.skip('skipped group', () => {
|
|
35
|
-
* test('example', async ({ page }) => {
|
|
36
|
-
* // This test will not run
|
|
37
|
-
* });
|
|
38
|
-
* });
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @param title Group title.
|
|
42
|
-
* @param callback A callback that is run immediately when calling
|
|
43
|
-
* [test.describe.skip(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-skip). Any tests
|
|
44
|
-
* added in this callback will belong to the group, and will not be run.
|
|
45
|
-
*/
|
|
46
|
-
skip: SuiteFunction;
|
|
47
|
-
/**
|
|
48
|
-
* Declares a test group similarly to
|
|
49
|
-
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1). Tests in this group
|
|
50
|
-
* are marked as "fixme" and will not be executed.
|
|
51
|
-
*
|
|
52
|
-
* **Usage**
|
|
53
|
-
*
|
|
54
|
-
* ```js
|
|
55
|
-
* test.describe.fixme('broken tests', () => {
|
|
56
|
-
* test('example', async ({ page }) => {
|
|
57
|
-
* // This test will not run
|
|
58
|
-
* });
|
|
59
|
-
* });
|
|
60
|
-
* ```
|
|
61
|
-
*
|
|
62
|
-
* @param title Group title.
|
|
63
|
-
* @param callback A callback that is run immediately when calling
|
|
64
|
-
* [test.describe.fixme(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-fixme). Any tests
|
|
65
|
-
* added in this callback will belong to the group, and will not be run.
|
|
66
|
-
*/
|
|
67
|
-
fixme: SuiteFunction;
|
|
68
|
-
/**
|
|
69
|
-
* **NOTE** See [test.describe.configure([options])](https://playwright.dev/docs/api/class-test#test-describe-configure) for
|
|
70
|
-
* the preferred way of configuring the execution mode.
|
|
71
|
-
*
|
|
72
|
-
* Declares a group of tests that should always be run serially. If one of the tests fails, all subsequent tests are
|
|
73
|
-
* skipped. All tests in a group are retried together.
|
|
74
|
-
*
|
|
75
|
-
* **NOTE** Using serial is not recommended. It is usually better to make your tests isolated, so they can be run
|
|
76
|
-
* independently.
|
|
77
|
-
*
|
|
78
|
-
* **Usage**
|
|
79
|
-
*
|
|
80
|
-
* ```js
|
|
81
|
-
* test.describe.serial('group', () => {
|
|
82
|
-
* test('runs first', async ({ page }) => {});
|
|
83
|
-
* test('runs second', async ({ page }) => {});
|
|
84
|
-
* });
|
|
85
|
-
* ```
|
|
86
|
-
*
|
|
87
|
-
* @param title Group title.
|
|
88
|
-
* @param callback A callback that is run immediately when calling
|
|
89
|
-
* [test.describe.serial(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-serial). Any tests
|
|
90
|
-
* added in this callback will belong to the group.
|
|
91
|
-
*/
|
|
92
|
-
serial: SuiteFunction & {
|
|
93
|
-
/**
|
|
94
|
-
* **NOTE** See [test.describe.configure([options])](https://playwright.dev/docs/api/class-test#test-describe-configure) for
|
|
95
|
-
* the preferred way of configuring the execution mode.
|
|
96
|
-
*
|
|
97
|
-
* Declares a focused group of tests that should always be run serially. If one of the tests fails, all subsequent
|
|
98
|
-
* tests are skipped. All tests in a group are retried together. If there are some focused tests or suites, all of
|
|
99
|
-
* them will be run but nothing else.
|
|
100
|
-
*
|
|
101
|
-
* **NOTE** Using serial is not recommended. It is usually better to make your tests isolated, so they can be run
|
|
102
|
-
* independently.
|
|
103
|
-
*
|
|
104
|
-
* **Usage**
|
|
105
|
-
*
|
|
106
|
-
* ```js
|
|
107
|
-
* test.describe.serial.only('group', () => {
|
|
108
|
-
* test('runs first', async ({ page }) => {
|
|
109
|
-
* });
|
|
110
|
-
* test('runs second', async ({ page }) => {
|
|
111
|
-
* });
|
|
112
|
-
* });
|
|
113
|
-
* ```
|
|
114
|
-
*
|
|
115
|
-
* @param title Group title.
|
|
116
|
-
* @param callback A callback that is run immediately when calling
|
|
117
|
-
* [test.describe.serial.only(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-serial-only).
|
|
118
|
-
* Any tests added in this callback will belong to the group.
|
|
119
|
-
*/
|
|
120
|
-
only: SuiteFunction;
|
|
121
|
-
};
|
|
122
|
-
/**
|
|
123
|
-
* **NOTE** See [test.describe.configure([options])](https://playwright.dev/docs/api/class-test#test-describe-configure) for
|
|
124
|
-
* the preferred way of configuring the execution mode.
|
|
125
|
-
*
|
|
126
|
-
* Declares a group of tests that could be run in parallel. By default, tests in a single test file run one after
|
|
127
|
-
* another, but using
|
|
128
|
-
* [test.describe.parallel(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel) allows
|
|
129
|
-
* them to run in parallel.
|
|
130
|
-
*
|
|
131
|
-
* **Usage**
|
|
132
|
-
*
|
|
133
|
-
* ```js
|
|
134
|
-
* test.describe.parallel('group', () => {
|
|
135
|
-
* test('runs in parallel 1', async ({ page }) => {});
|
|
136
|
-
* test('runs in parallel 2', async ({ page }) => {});
|
|
137
|
-
* });
|
|
138
|
-
* ```
|
|
139
|
-
*
|
|
140
|
-
* Note that parallel tests are executed in separate processes and cannot share any state or global variables. Each of
|
|
141
|
-
* the parallel tests executes all relevant hooks.
|
|
142
|
-
* @param title Group title.
|
|
143
|
-
* @param callback A callback that is run immediately when calling
|
|
144
|
-
* [test.describe.parallel(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel). Any
|
|
145
|
-
* tests added in this callback will belong to the group.
|
|
146
|
-
*/
|
|
147
|
-
parallel: SuiteFunction & {
|
|
148
|
-
/**
|
|
149
|
-
* **NOTE** See [test.describe.configure([options])](https://playwright.dev/docs/api/class-test#test-describe-configure) for
|
|
150
|
-
* the preferred way of configuring the execution mode.
|
|
151
|
-
*
|
|
152
|
-
* Declares a focused group of tests that could be run in parallel. This is similar to
|
|
153
|
-
* [test.describe.parallel(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel), but
|
|
154
|
-
* focuses the group. If there are some focused tests or suites, all of them will be run but nothing else.
|
|
155
|
-
*
|
|
156
|
-
* **Usage**
|
|
157
|
-
*
|
|
158
|
-
* ```js
|
|
159
|
-
* test.describe.parallel.only('group', () => {
|
|
160
|
-
* test('runs in parallel 1', async ({ page }) => {});
|
|
161
|
-
* test('runs in parallel 2', async ({ page }) => {});
|
|
162
|
-
* });
|
|
163
|
-
* ```
|
|
164
|
-
*
|
|
165
|
-
* @param title Group title.
|
|
166
|
-
* @param callback A callback that is run immediately when calling
|
|
167
|
-
* [test.describe.parallel.only(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel-only).
|
|
168
|
-
* Any tests added in this callback will belong to the group.
|
|
169
|
-
*/
|
|
170
|
-
only: SuiteFunction;
|
|
171
|
-
};
|
|
172
|
-
/**
|
|
173
|
-
* Configures the enclosing scope. Can be executed either on the top level or inside a describe. Configuration applies
|
|
174
|
-
* to the entire scope, regardless of whether it run before or after the test declaration.
|
|
175
|
-
*
|
|
176
|
-
* Learn more about the execution modes [here](https://playwright.dev/docs/test-parallel).
|
|
177
|
-
*
|
|
178
|
-
* **Usage**
|
|
179
|
-
* - Running tests in parallel.
|
|
180
|
-
*
|
|
181
|
-
* ```js
|
|
182
|
-
* // Run all the tests in the file concurrently using parallel workers.
|
|
183
|
-
* test.describe.configure({ mode: 'parallel' });
|
|
184
|
-
* test('runs in parallel 1', async ({ page }) => {});
|
|
185
|
-
* test('runs in parallel 2', async ({ page }) => {});
|
|
186
|
-
* ```
|
|
187
|
-
*
|
|
188
|
-
* - Running tests serially, retrying from the start.
|
|
189
|
-
*
|
|
190
|
-
* **NOTE** Running serially is not recommended. It is usually better to make your tests isolated, so they can be
|
|
191
|
-
* run independently.
|
|
192
|
-
*
|
|
193
|
-
* ```js
|
|
194
|
-
* // Annotate tests as inter-dependent.
|
|
195
|
-
* test.describe.configure({ mode: 'serial' });
|
|
196
|
-
* test('runs first', async ({ page }) => {});
|
|
197
|
-
* test('runs second', async ({ page }) => {});
|
|
198
|
-
* ```
|
|
199
|
-
*
|
|
200
|
-
* - Configuring retries and timeout for each test.
|
|
201
|
-
*
|
|
202
|
-
* ```js
|
|
203
|
-
* // Each test in the file will be retried twice and have a timeout of 20 seconds.
|
|
204
|
-
* test.describe.configure({ retries: 2, timeout: 20_000 });
|
|
205
|
-
* test('runs first', async ({ page }) => {});
|
|
206
|
-
* test('runs second', async ({ page }) => {});
|
|
207
|
-
* ```
|
|
208
|
-
*
|
|
209
|
-
* - Run multiple describes in parallel, but tests inside each describe in order.
|
|
210
|
-
*
|
|
211
|
-
* ```js
|
|
212
|
-
* test.describe.configure({ mode: 'parallel' });
|
|
213
|
-
*
|
|
214
|
-
* test.describe('A, runs in parallel with B', () => {
|
|
215
|
-
* test.describe.configure({ mode: 'default' });
|
|
216
|
-
* test('in order A1', async ({ page }) => {});
|
|
217
|
-
* test('in order A2', async ({ page }) => {});
|
|
218
|
-
* });
|
|
219
|
-
*
|
|
220
|
-
* test.describe('B, runs in parallel with A', () => {
|
|
221
|
-
* test.describe.configure({ mode: 'default' });
|
|
222
|
-
* test('in order B1', async ({ page }) => {});
|
|
223
|
-
* test('in order B2', async ({ page }) => {});
|
|
224
|
-
* });
|
|
225
|
-
* ```
|
|
226
|
-
*
|
|
227
|
-
* @param options
|
|
228
|
-
*/
|
|
229
|
-
configure: (options: {
|
|
230
|
-
mode?: 'default' | 'parallel' | 'serial';
|
|
231
|
-
retries?: number;
|
|
232
|
-
timeout?: number;
|
|
233
|
-
}) => void;
|
|
234
|
-
};
|
|
235
|
-
//# sourceMappingURL=DescribeFunction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DescribeFunction.d.ts","sourceRoot":"","sources":["../../src/api/DescribeFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIrD,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,IAAI,EAAE,aAAa,CAAC;IACpB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,EAAE,aAAa,CAAC;IACpB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,MAAM,EAAE,aAAa,GAAG;QACpB;;;;;;;;;;;;;;;;;;;;;;;;;;WA0BG;QACH,IAAI,EAAE,aAAa,CAAC;KACvB,CAAC;IACF;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,EAAE,aAAa,GAAG;QACtB;;;;;;;;;;;;;;;;;;;;;WAqBG;QACH,IAAI,EAAE,aAAa,CAAC;KACvB,CAAC;IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAClH,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DescribeFunction.js","sourceRoot":"","sources":["../../src/api/DescribeFunction.ts"],"names":[],"mappings":""}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { TestDetails } from '@playwright/test';
|
|
2
|
-
export interface SuiteFunction {
|
|
3
|
-
/**
|
|
4
|
-
* Declares a group of tests.
|
|
5
|
-
*
|
|
6
|
-
* **Usage**
|
|
7
|
-
*
|
|
8
|
-
* ```js
|
|
9
|
-
* test.describe('two tests', () => {
|
|
10
|
-
* test('one', async ({ page }) => {
|
|
11
|
-
* // ...
|
|
12
|
-
* });
|
|
13
|
-
*
|
|
14
|
-
* test('two', async ({ page }) => {
|
|
15
|
-
* // ...
|
|
16
|
-
* });
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @param title Group title.
|
|
21
|
-
* @param callback A callback that is run immediately when calling
|
|
22
|
-
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1). Any tests added in
|
|
23
|
-
* this callback will belong to the group.
|
|
24
|
-
*/
|
|
25
|
-
(title: string, callback: () => void): void;
|
|
26
|
-
/**
|
|
27
|
-
* Declares an anonymous group of tests. This is convenient to give a group of tests a common option with
|
|
28
|
-
* [test.use(options)](https://playwright.dev/docs/api/class-test#test-use).
|
|
29
|
-
*
|
|
30
|
-
* **Usage**
|
|
31
|
-
*
|
|
32
|
-
* ```js
|
|
33
|
-
* test.describe(() => {
|
|
34
|
-
* test.use({ colorScheme: 'dark' });
|
|
35
|
-
*
|
|
36
|
-
* test('one', async ({ page }) => {
|
|
37
|
-
* // ...
|
|
38
|
-
* });
|
|
39
|
-
*
|
|
40
|
-
* test('two', async ({ page }) => {
|
|
41
|
-
* // ...
|
|
42
|
-
* });
|
|
43
|
-
* });
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @param callback A callback that is run immediately when calling
|
|
47
|
-
* [test.describe(callback)](https://playwright.dev/docs/api/class-test#test-describe-2). Any tests added in this
|
|
48
|
-
* callback will belong to the group.
|
|
49
|
-
*/
|
|
50
|
-
(callback: () => void): void;
|
|
51
|
-
/**
|
|
52
|
-
* Declares a group of tests.
|
|
53
|
-
*
|
|
54
|
-
* @param title Group title.
|
|
55
|
-
* @param details Additional details for all tests in the group.
|
|
56
|
-
* @param callback A callback that is run immediately when calling
|
|
57
|
-
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1). Any tests added in
|
|
58
|
-
* this callback will belong to the group.
|
|
59
|
-
*/
|
|
60
|
-
(title: string, details: TestDetails, callback: () => void): void;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=SuiteFunction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SuiteFunction.d.ts","sourceRoot":"","sources":["../../src/api/SuiteFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAKpD,MAAM,WAAW,aAAa;IAC1B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAC5C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAE7B;;;;;;;;OAQG;IACH,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACrE"}
|
package/lib/api/SuiteFunction.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SuiteFunction.js","sourceRoot":"","sources":["../../src/api/SuiteFunction.ts"],"names":[],"mappings":""}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import type { SuiteFunction } from './SuiteFunction';
|
|
2
|
-
|
|
3
|
-
// Playwright Test doesn't export all its public APIs, hence the need for this workaround
|
|
4
|
-
// See https://github.com/microsoft/playwright/pull/24146
|
|
5
|
-
export type DescribeFunction = SuiteFunction & {
|
|
6
|
-
/**
|
|
7
|
-
* Declares a focused group of tests. If there are some focused tests or suites, all of them will be run but nothing
|
|
8
|
-
* else.
|
|
9
|
-
*
|
|
10
|
-
* **Usage**
|
|
11
|
-
*
|
|
12
|
-
* ```js
|
|
13
|
-
* test.describe.only('focused group', () => {
|
|
14
|
-
* test('in the focused group', async ({ page }) => {
|
|
15
|
-
* // This test will run
|
|
16
|
-
* });
|
|
17
|
-
* });
|
|
18
|
-
* test('not in the focused group', async ({ page }) => {
|
|
19
|
-
* // This test will not run
|
|
20
|
-
* });
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @param title Group title.
|
|
24
|
-
* @param callback A callback that is run immediately when calling
|
|
25
|
-
* [test.describe.only(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-only). Any tests
|
|
26
|
-
* added in this callback will belong to the group.
|
|
27
|
-
*/
|
|
28
|
-
only: SuiteFunction;
|
|
29
|
-
/**
|
|
30
|
-
* Declares a skipped test group, similarly to
|
|
31
|
-
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1). Tests in the skipped
|
|
32
|
-
* group are never run.
|
|
33
|
-
*
|
|
34
|
-
* **Usage**
|
|
35
|
-
*
|
|
36
|
-
* ```js
|
|
37
|
-
* test.describe.skip('skipped group', () => {
|
|
38
|
-
* test('example', async ({ page }) => {
|
|
39
|
-
* // This test will not run
|
|
40
|
-
* });
|
|
41
|
-
* });
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* @param title Group title.
|
|
45
|
-
* @param callback A callback that is run immediately when calling
|
|
46
|
-
* [test.describe.skip(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-skip). Any tests
|
|
47
|
-
* added in this callback will belong to the group, and will not be run.
|
|
48
|
-
*/
|
|
49
|
-
skip: SuiteFunction;
|
|
50
|
-
/**
|
|
51
|
-
* Declares a test group similarly to
|
|
52
|
-
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1). Tests in this group
|
|
53
|
-
* are marked as "fixme" and will not be executed.
|
|
54
|
-
*
|
|
55
|
-
* **Usage**
|
|
56
|
-
*
|
|
57
|
-
* ```js
|
|
58
|
-
* test.describe.fixme('broken tests', () => {
|
|
59
|
-
* test('example', async ({ page }) => {
|
|
60
|
-
* // This test will not run
|
|
61
|
-
* });
|
|
62
|
-
* });
|
|
63
|
-
* ```
|
|
64
|
-
*
|
|
65
|
-
* @param title Group title.
|
|
66
|
-
* @param callback A callback that is run immediately when calling
|
|
67
|
-
* [test.describe.fixme(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-fixme). Any tests
|
|
68
|
-
* added in this callback will belong to the group, and will not be run.
|
|
69
|
-
*/
|
|
70
|
-
fixme: SuiteFunction;
|
|
71
|
-
/**
|
|
72
|
-
* **NOTE** See [test.describe.configure([options])](https://playwright.dev/docs/api/class-test#test-describe-configure) for
|
|
73
|
-
* the preferred way of configuring the execution mode.
|
|
74
|
-
*
|
|
75
|
-
* Declares a group of tests that should always be run serially. If one of the tests fails, all subsequent tests are
|
|
76
|
-
* skipped. All tests in a group are retried together.
|
|
77
|
-
*
|
|
78
|
-
* **NOTE** Using serial is not recommended. It is usually better to make your tests isolated, so they can be run
|
|
79
|
-
* independently.
|
|
80
|
-
*
|
|
81
|
-
* **Usage**
|
|
82
|
-
*
|
|
83
|
-
* ```js
|
|
84
|
-
* test.describe.serial('group', () => {
|
|
85
|
-
* test('runs first', async ({ page }) => {});
|
|
86
|
-
* test('runs second', async ({ page }) => {});
|
|
87
|
-
* });
|
|
88
|
-
* ```
|
|
89
|
-
*
|
|
90
|
-
* @param title Group title.
|
|
91
|
-
* @param callback A callback that is run immediately when calling
|
|
92
|
-
* [test.describe.serial(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-serial). Any tests
|
|
93
|
-
* added in this callback will belong to the group.
|
|
94
|
-
*/
|
|
95
|
-
serial: SuiteFunction & {
|
|
96
|
-
/**
|
|
97
|
-
* **NOTE** See [test.describe.configure([options])](https://playwright.dev/docs/api/class-test#test-describe-configure) for
|
|
98
|
-
* the preferred way of configuring the execution mode.
|
|
99
|
-
*
|
|
100
|
-
* Declares a focused group of tests that should always be run serially. If one of the tests fails, all subsequent
|
|
101
|
-
* tests are skipped. All tests in a group are retried together. If there are some focused tests or suites, all of
|
|
102
|
-
* them will be run but nothing else.
|
|
103
|
-
*
|
|
104
|
-
* **NOTE** Using serial is not recommended. It is usually better to make your tests isolated, so they can be run
|
|
105
|
-
* independently.
|
|
106
|
-
*
|
|
107
|
-
* **Usage**
|
|
108
|
-
*
|
|
109
|
-
* ```js
|
|
110
|
-
* test.describe.serial.only('group', () => {
|
|
111
|
-
* test('runs first', async ({ page }) => {
|
|
112
|
-
* });
|
|
113
|
-
* test('runs second', async ({ page }) => {
|
|
114
|
-
* });
|
|
115
|
-
* });
|
|
116
|
-
* ```
|
|
117
|
-
*
|
|
118
|
-
* @param title Group title.
|
|
119
|
-
* @param callback A callback that is run immediately when calling
|
|
120
|
-
* [test.describe.serial.only(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-serial-only).
|
|
121
|
-
* Any tests added in this callback will belong to the group.
|
|
122
|
-
*/
|
|
123
|
-
only: SuiteFunction;
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* **NOTE** See [test.describe.configure([options])](https://playwright.dev/docs/api/class-test#test-describe-configure) for
|
|
127
|
-
* the preferred way of configuring the execution mode.
|
|
128
|
-
*
|
|
129
|
-
* Declares a group of tests that could be run in parallel. By default, tests in a single test file run one after
|
|
130
|
-
* another, but using
|
|
131
|
-
* [test.describe.parallel(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel) allows
|
|
132
|
-
* them to run in parallel.
|
|
133
|
-
*
|
|
134
|
-
* **Usage**
|
|
135
|
-
*
|
|
136
|
-
* ```js
|
|
137
|
-
* test.describe.parallel('group', () => {
|
|
138
|
-
* test('runs in parallel 1', async ({ page }) => {});
|
|
139
|
-
* test('runs in parallel 2', async ({ page }) => {});
|
|
140
|
-
* });
|
|
141
|
-
* ```
|
|
142
|
-
*
|
|
143
|
-
* Note that parallel tests are executed in separate processes and cannot share any state or global variables. Each of
|
|
144
|
-
* the parallel tests executes all relevant hooks.
|
|
145
|
-
* @param title Group title.
|
|
146
|
-
* @param callback A callback that is run immediately when calling
|
|
147
|
-
* [test.describe.parallel(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel). Any
|
|
148
|
-
* tests added in this callback will belong to the group.
|
|
149
|
-
*/
|
|
150
|
-
parallel: SuiteFunction & {
|
|
151
|
-
/**
|
|
152
|
-
* **NOTE** See [test.describe.configure([options])](https://playwright.dev/docs/api/class-test#test-describe-configure) for
|
|
153
|
-
* the preferred way of configuring the execution mode.
|
|
154
|
-
*
|
|
155
|
-
* Declares a focused group of tests that could be run in parallel. This is similar to
|
|
156
|
-
* [test.describe.parallel(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel), but
|
|
157
|
-
* focuses the group. If there are some focused tests or suites, all of them will be run but nothing else.
|
|
158
|
-
*
|
|
159
|
-
* **Usage**
|
|
160
|
-
*
|
|
161
|
-
* ```js
|
|
162
|
-
* test.describe.parallel.only('group', () => {
|
|
163
|
-
* test('runs in parallel 1', async ({ page }) => {});
|
|
164
|
-
* test('runs in parallel 2', async ({ page }) => {});
|
|
165
|
-
* });
|
|
166
|
-
* ```
|
|
167
|
-
*
|
|
168
|
-
* @param title Group title.
|
|
169
|
-
* @param callback A callback that is run immediately when calling
|
|
170
|
-
* [test.describe.parallel.only(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel-only).
|
|
171
|
-
* Any tests added in this callback will belong to the group.
|
|
172
|
-
*/
|
|
173
|
-
only: SuiteFunction;
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* Configures the enclosing scope. Can be executed either on the top level or inside a describe. Configuration applies
|
|
177
|
-
* to the entire scope, regardless of whether it run before or after the test declaration.
|
|
178
|
-
*
|
|
179
|
-
* Learn more about the execution modes [here](https://playwright.dev/docs/test-parallel).
|
|
180
|
-
*
|
|
181
|
-
* **Usage**
|
|
182
|
-
* - Running tests in parallel.
|
|
183
|
-
*
|
|
184
|
-
* ```js
|
|
185
|
-
* // Run all the tests in the file concurrently using parallel workers.
|
|
186
|
-
* test.describe.configure({ mode: 'parallel' });
|
|
187
|
-
* test('runs in parallel 1', async ({ page }) => {});
|
|
188
|
-
* test('runs in parallel 2', async ({ page }) => {});
|
|
189
|
-
* ```
|
|
190
|
-
*
|
|
191
|
-
* - Running tests serially, retrying from the start.
|
|
192
|
-
*
|
|
193
|
-
* **NOTE** Running serially is not recommended. It is usually better to make your tests isolated, so they can be
|
|
194
|
-
* run independently.
|
|
195
|
-
*
|
|
196
|
-
* ```js
|
|
197
|
-
* // Annotate tests as inter-dependent.
|
|
198
|
-
* test.describe.configure({ mode: 'serial' });
|
|
199
|
-
* test('runs first', async ({ page }) => {});
|
|
200
|
-
* test('runs second', async ({ page }) => {});
|
|
201
|
-
* ```
|
|
202
|
-
*
|
|
203
|
-
* - Configuring retries and timeout for each test.
|
|
204
|
-
*
|
|
205
|
-
* ```js
|
|
206
|
-
* // Each test in the file will be retried twice and have a timeout of 20 seconds.
|
|
207
|
-
* test.describe.configure({ retries: 2, timeout: 20_000 });
|
|
208
|
-
* test('runs first', async ({ page }) => {});
|
|
209
|
-
* test('runs second', async ({ page }) => {});
|
|
210
|
-
* ```
|
|
211
|
-
*
|
|
212
|
-
* - Run multiple describes in parallel, but tests inside each describe in order.
|
|
213
|
-
*
|
|
214
|
-
* ```js
|
|
215
|
-
* test.describe.configure({ mode: 'parallel' });
|
|
216
|
-
*
|
|
217
|
-
* test.describe('A, runs in parallel with B', () => {
|
|
218
|
-
* test.describe.configure({ mode: 'default' });
|
|
219
|
-
* test('in order A1', async ({ page }) => {});
|
|
220
|
-
* test('in order A2', async ({ page }) => {});
|
|
221
|
-
* });
|
|
222
|
-
*
|
|
223
|
-
* test.describe('B, runs in parallel with A', () => {
|
|
224
|
-
* test.describe.configure({ mode: 'default' });
|
|
225
|
-
* test('in order B1', async ({ page }) => {});
|
|
226
|
-
* test('in order B2', async ({ page }) => {});
|
|
227
|
-
* });
|
|
228
|
-
* ```
|
|
229
|
-
*
|
|
230
|
-
* @param options
|
|
231
|
-
*/
|
|
232
|
-
configure: (options: { mode?: 'default' | 'parallel' | 'serial', retries?: number, timeout?: number }) => void;
|
|
233
|
-
}
|
package/src/api/SuiteFunction.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { TestDetails } from '@playwright/test';
|
|
2
|
-
|
|
3
|
-
// Playwright Test doesn't export all its public APIs, hence the need for this workaround
|
|
4
|
-
|
|
5
|
-
// See https://github.com/microsoft/playwright/pull/24146
|
|
6
|
-
export interface SuiteFunction {
|
|
7
|
-
/**
|
|
8
|
-
* Declares a group of tests.
|
|
9
|
-
*
|
|
10
|
-
* **Usage**
|
|
11
|
-
*
|
|
12
|
-
* ```js
|
|
13
|
-
* test.describe('two tests', () => {
|
|
14
|
-
* test('one', async ({ page }) => {
|
|
15
|
-
* // ...
|
|
16
|
-
* });
|
|
17
|
-
*
|
|
18
|
-
* test('two', async ({ page }) => {
|
|
19
|
-
* // ...
|
|
20
|
-
* });
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @param title Group title.
|
|
25
|
-
* @param callback A callback that is run immediately when calling
|
|
26
|
-
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1). Any tests added in
|
|
27
|
-
* this callback will belong to the group.
|
|
28
|
-
*/
|
|
29
|
-
(title: string, callback: () => void): void;
|
|
30
|
-
/**
|
|
31
|
-
* Declares an anonymous group of tests. This is convenient to give a group of tests a common option with
|
|
32
|
-
* [test.use(options)](https://playwright.dev/docs/api/class-test#test-use).
|
|
33
|
-
*
|
|
34
|
-
* **Usage**
|
|
35
|
-
*
|
|
36
|
-
* ```js
|
|
37
|
-
* test.describe(() => {
|
|
38
|
-
* test.use({ colorScheme: 'dark' });
|
|
39
|
-
*
|
|
40
|
-
* test('one', async ({ page }) => {
|
|
41
|
-
* // ...
|
|
42
|
-
* });
|
|
43
|
-
*
|
|
44
|
-
* test('two', async ({ page }) => {
|
|
45
|
-
* // ...
|
|
46
|
-
* });
|
|
47
|
-
* });
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* @param callback A callback that is run immediately when calling
|
|
51
|
-
* [test.describe(callback)](https://playwright.dev/docs/api/class-test#test-describe-2). Any tests added in this
|
|
52
|
-
* callback will belong to the group.
|
|
53
|
-
*/
|
|
54
|
-
(callback: () => void): void;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Declares a group of tests.
|
|
58
|
-
*
|
|
59
|
-
* @param title Group title.
|
|
60
|
-
* @param details Additional details for all tests in the group.
|
|
61
|
-
* @param callback A callback that is run immediately when calling
|
|
62
|
-
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1). Any tests added in
|
|
63
|
-
* this callback will belong to the group.
|
|
64
|
-
*/
|
|
65
|
-
(title: string, details: TestDetails, callback: () => void): void;
|
|
66
|
-
}
|