playwright 1.55.0-alpha-2025-07-24 → 1.55.0-alpha-2025-07-25
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.
Potentially problematic release.
This version of playwright might be problematic. Click here for more details.
- package/lib/reporters/html.js +4 -3
- package/lib/worker/testInfo.js +8 -2
- package/package.json +2 -2
- package/types/test.d.ts +26 -20
package/lib/reporters/html.js
CHANGED
|
@@ -287,7 +287,8 @@ class HtmlBuilder {
|
|
|
287
287
|
const popup = window.open(hmrURL);
|
|
288
288
|
const listener = (evt) => {
|
|
289
289
|
if (evt.source === popup && evt.data === "ready") {
|
|
290
|
-
|
|
290
|
+
const element = document.getElementById("playwrightReportBase64");
|
|
291
|
+
popup.postMessage(element?.textContent ?? "", hmrURL.origin);
|
|
291
292
|
window.removeEventListener("message", listener);
|
|
292
293
|
window.close();
|
|
293
294
|
}
|
|
@@ -319,13 +320,13 @@ class HtmlBuilder {
|
|
|
319
320
|
return { ok, singleTestId };
|
|
320
321
|
}
|
|
321
322
|
async _writeReportData(filePath) {
|
|
322
|
-
import_fs.default.appendFileSync(filePath, '<script
|
|
323
|
+
import_fs.default.appendFileSync(filePath, '<script id="playwrightReportBase64" type="application/zip">data:application/zip;base64,');
|
|
323
324
|
await new Promise((f) => {
|
|
324
325
|
this._dataZipFile.end(void 0, () => {
|
|
325
326
|
this._dataZipFile.outputStream.pipe(new Base64Encoder()).pipe(import_fs.default.createWriteStream(filePath, { flags: "a" })).on("close", f);
|
|
326
327
|
});
|
|
327
328
|
});
|
|
328
|
-
import_fs.default.appendFileSync(filePath, '"
|
|
329
|
+
import_fs.default.appendFileSync(filePath, '"</script>');
|
|
329
330
|
}
|
|
330
331
|
_addDataFile(fileName, data) {
|
|
331
332
|
this._dataZipFile.addBuffer(Buffer.from(JSON.stringify(data)), fileName);
|
package/lib/worker/testInfo.js
CHANGED
|
@@ -197,7 +197,7 @@ class TestInfoImpl {
|
|
|
197
197
|
...data,
|
|
198
198
|
steps: [],
|
|
199
199
|
attachmentIndices,
|
|
200
|
-
info: new TestStepInfoImpl(this, stepId),
|
|
200
|
+
info: new TestStepInfoImpl(this, stepId, data.title, parentStep?.info),
|
|
201
201
|
complete: (result) => {
|
|
202
202
|
if (step.endWallTime)
|
|
203
203
|
return;
|
|
@@ -428,10 +428,12 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
class TestStepInfoImpl {
|
|
431
|
-
constructor(testInfo, stepId) {
|
|
431
|
+
constructor(testInfo, stepId, title, parentStep) {
|
|
432
432
|
this.annotations = [];
|
|
433
433
|
this._testInfo = testInfo;
|
|
434
434
|
this._stepId = stepId;
|
|
435
|
+
this._title = title;
|
|
436
|
+
this._parentStep = parentStep;
|
|
435
437
|
this.skip = (0, import_transform.wrapFunctionWithLocation)((location, ...args) => {
|
|
436
438
|
if (args.length > 0 && !args[0])
|
|
437
439
|
return;
|
|
@@ -459,6 +461,10 @@ class TestStepInfoImpl {
|
|
|
459
461
|
async attach(name, options) {
|
|
460
462
|
this._attachToStep(await (0, import_util.normalizeAndSaveAttachment)(this._testInfo.outputPath(), name, options));
|
|
461
463
|
}
|
|
464
|
+
get titlePath() {
|
|
465
|
+
const parent = this._parentStep ?? this._testInfo;
|
|
466
|
+
return [...parent.titlePath, this._title];
|
|
467
|
+
}
|
|
462
468
|
}
|
|
463
469
|
class TestSkipError extends Error {
|
|
464
470
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright",
|
|
3
|
-
"version": "1.55.0-alpha-2025-07-
|
|
3
|
+
"version": "1.55.0-alpha-2025-07-25",
|
|
4
4
|
"description": "A high-level API to automate web browsers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"license": "Apache-2.0",
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"playwright-core": "1.55.0-alpha-2025-07-
|
|
59
|
+
"playwright-core": "1.55.0-alpha-2025-07-25"
|
|
60
60
|
},
|
|
61
61
|
"optionalDependencies": {
|
|
62
62
|
"fsevents": "2.3.2"
|
package/types/test.d.ts
CHANGED
|
@@ -4186,7 +4186,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4186
4186
|
* });
|
|
4187
4187
|
* ```
|
|
4188
4188
|
*
|
|
4189
|
-
* You can also call `test.skip()` without arguments inside the test body to always
|
|
4189
|
+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
|
|
4190
4190
|
* recommend using `test.skip(title, body)` instead.
|
|
4191
4191
|
*
|
|
4192
4192
|
* ```js
|
|
@@ -4203,9 +4203,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4203
4203
|
* description.
|
|
4204
4204
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4205
4205
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4206
|
-
* @param condition Test is marked as "
|
|
4207
|
-
* @param callback A function that returns whether to mark as "
|
|
4208
|
-
*
|
|
4206
|
+
* @param condition Test is marked as "skipped" when the condition is `true`.
|
|
4207
|
+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
|
|
4208
|
+
* when the return value is `true`.
|
|
4209
4209
|
* @param description Optional description that will be reflected in a test report.
|
|
4210
4210
|
*/
|
|
4211
4211
|
skip(title: string, body: TestBody<TestArgs & WorkerArgs>): void;
|
|
@@ -4267,7 +4267,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4267
4267
|
* });
|
|
4268
4268
|
* ```
|
|
4269
4269
|
*
|
|
4270
|
-
* You can also call `test.skip()` without arguments inside the test body to always
|
|
4270
|
+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
|
|
4271
4271
|
* recommend using `test.skip(title, body)` instead.
|
|
4272
4272
|
*
|
|
4273
4273
|
* ```js
|
|
@@ -4284,9 +4284,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4284
4284
|
* description.
|
|
4285
4285
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4286
4286
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4287
|
-
* @param condition Test is marked as "
|
|
4288
|
-
* @param callback A function that returns whether to mark as "
|
|
4289
|
-
*
|
|
4287
|
+
* @param condition Test is marked as "skipped" when the condition is `true`.
|
|
4288
|
+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
|
|
4289
|
+
* when the return value is `true`.
|
|
4290
4290
|
* @param description Optional description that will be reflected in a test report.
|
|
4291
4291
|
*/
|
|
4292
4292
|
skip(title: string, details: TestDetails, body: TestBody<TestArgs & WorkerArgs>): void;
|
|
@@ -4348,7 +4348,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4348
4348
|
* });
|
|
4349
4349
|
* ```
|
|
4350
4350
|
*
|
|
4351
|
-
* You can also call `test.skip()` without arguments inside the test body to always
|
|
4351
|
+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
|
|
4352
4352
|
* recommend using `test.skip(title, body)` instead.
|
|
4353
4353
|
*
|
|
4354
4354
|
* ```js
|
|
@@ -4365,9 +4365,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4365
4365
|
* description.
|
|
4366
4366
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4367
4367
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4368
|
-
* @param condition Test is marked as "
|
|
4369
|
-
* @param callback A function that returns whether to mark as "
|
|
4370
|
-
*
|
|
4368
|
+
* @param condition Test is marked as "skipped" when the condition is `true`.
|
|
4369
|
+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
|
|
4370
|
+
* when the return value is `true`.
|
|
4371
4371
|
* @param description Optional description that will be reflected in a test report.
|
|
4372
4372
|
*/
|
|
4373
4373
|
skip(): void;
|
|
@@ -4429,7 +4429,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4429
4429
|
* });
|
|
4430
4430
|
* ```
|
|
4431
4431
|
*
|
|
4432
|
-
* You can also call `test.skip()` without arguments inside the test body to always
|
|
4432
|
+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
|
|
4433
4433
|
* recommend using `test.skip(title, body)` instead.
|
|
4434
4434
|
*
|
|
4435
4435
|
* ```js
|
|
@@ -4446,9 +4446,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4446
4446
|
* description.
|
|
4447
4447
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4448
4448
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4449
|
-
* @param condition Test is marked as "
|
|
4450
|
-
* @param callback A function that returns whether to mark as "
|
|
4451
|
-
*
|
|
4449
|
+
* @param condition Test is marked as "skipped" when the condition is `true`.
|
|
4450
|
+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
|
|
4451
|
+
* when the return value is `true`.
|
|
4452
4452
|
* @param description Optional description that will be reflected in a test report.
|
|
4453
4453
|
*/
|
|
4454
4454
|
skip(condition: boolean, description?: string): void;
|
|
@@ -4510,7 +4510,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4510
4510
|
* });
|
|
4511
4511
|
* ```
|
|
4512
4512
|
*
|
|
4513
|
-
* You can also call `test.skip()` without arguments inside the test body to always
|
|
4513
|
+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
|
|
4514
4514
|
* recommend using `test.skip(title, body)` instead.
|
|
4515
4515
|
*
|
|
4516
4516
|
* ```js
|
|
@@ -4527,9 +4527,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4527
4527
|
* description.
|
|
4528
4528
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4529
4529
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4530
|
-
* @param condition Test is marked as "
|
|
4531
|
-
* @param callback A function that returns whether to mark as "
|
|
4532
|
-
*
|
|
4530
|
+
* @param condition Test is marked as "skipped" when the condition is `true`.
|
|
4531
|
+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
|
|
4532
|
+
* when the return value is `true`.
|
|
4533
4533
|
* @param description Optional description that will be reflected in a test report.
|
|
4534
4534
|
*/
|
|
4535
4535
|
skip(callback: ConditionBody<TestArgs & WorkerArgs>, description?: string): void;
|
|
@@ -9914,6 +9914,12 @@ export interface TestStepInfo {
|
|
|
9914
9914
|
* @param description Optional description that will be reflected in a test report.
|
|
9915
9915
|
*/
|
|
9916
9916
|
skip(condition: boolean, description?: string): void;
|
|
9917
|
+
|
|
9918
|
+
/**
|
|
9919
|
+
* The full title path starting with the test file name, including the step titles. See also
|
|
9920
|
+
* [testInfo.titlePath](https://playwright.dev/docs/api/class-testinfo#test-info-title-path).
|
|
9921
|
+
*/
|
|
9922
|
+
titlePath: Array<string>;
|
|
9917
9923
|
}
|
|
9918
9924
|
|
|
9919
9925
|
/**
|