playwright 1.55.0-alpha-2025-08-12 → 1.55.0-alpha-2025-08-13
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/index.js +1 -2
- package/lib/matchers/expect.js +2 -3
- package/lib/reporters/html.js +1 -1
- package/lib/util.js +0 -19
- package/lib/worker/fixtureRunner.js +1 -1
- package/lib/worker/testInfo.js +2 -2
- package/lib/worker/testTracing.js +1 -1
- package/package.json +2 -2
- package/types/test.d.ts +15 -15
package/lib/index.js
CHANGED
|
@@ -42,7 +42,6 @@ var playwrightLibrary = __toESM(require("playwright-core"));
|
|
|
42
42
|
var import_utils = require("playwright-core/lib/utils");
|
|
43
43
|
var import_globals = require("./common/globals");
|
|
44
44
|
var import_testType = require("./common/testType");
|
|
45
|
-
var import_util = require("./util");
|
|
46
45
|
var import_expect = require("./matchers/expect");
|
|
47
46
|
var import_configLoader = require("./common/configLoader");
|
|
48
47
|
var import_testType2 = require("./common/testType");
|
|
@@ -242,7 +241,7 @@ const playwrightFixtures = {
|
|
|
242
241
|
if (zone.apiName)
|
|
243
242
|
data.apiName = zone.apiName;
|
|
244
243
|
if (zone.title)
|
|
245
|
-
data.title =
|
|
244
|
+
data.title = zone.title;
|
|
246
245
|
data.stepId = zone.stepId;
|
|
247
246
|
return;
|
|
248
247
|
}
|
package/lib/matchers/expect.js
CHANGED
|
@@ -222,15 +222,14 @@ class ExpectMetaInfoProxyHandler {
|
|
|
222
222
|
const customMessage = this._info.message || "";
|
|
223
223
|
const argsSuffix = computeArgsSuffix(matcherName, args);
|
|
224
224
|
const defaultTitle = `${this._info.poll ? "poll " : ""}${this._info.isSoft ? "soft " : ""}${this._info.isNot ? "not " : ""}${matcherName}${argsSuffix}`;
|
|
225
|
-
const title = customMessage || defaultTitle
|
|
225
|
+
const title = customMessage || `Expect ${(0, import_utils.escapeWithQuotes)(defaultTitle, '"')}`;
|
|
226
226
|
const apiName = `expect${this._info.poll ? ".poll " : ""}${this._info.isSoft ? ".soft " : ""}${this._info.isNot ? ".not" : ""}.${matcherName}${argsSuffix}`;
|
|
227
227
|
const stackFrames = (0, import_util.filteredStackTrace)((0, import_utils.captureRawStack)());
|
|
228
228
|
const category = matcherName === "toPass" || this._info.poll ? "test.step" : "expect";
|
|
229
|
-
const formattedTitle = category === "expect" ? title : `Expect "${title}"`;
|
|
230
229
|
const stepInfo = {
|
|
231
230
|
category,
|
|
232
231
|
apiName,
|
|
233
|
-
title
|
|
232
|
+
title,
|
|
234
233
|
params: args[0] ? { expected: args[0] } : void 0,
|
|
235
234
|
infectParentStepsWithError: this._info.isSoft
|
|
236
235
|
};
|
package/lib/reporters/html.js
CHANGED
|
@@ -472,7 +472,7 @@ class HtmlBuilder {
|
|
|
472
472
|
_createTestStep(dedupedStep, result) {
|
|
473
473
|
const { step, duration, count } = dedupedStep;
|
|
474
474
|
const skipped = dedupedStep.step.annotations?.find((a) => a.type === "skip");
|
|
475
|
-
let title =
|
|
475
|
+
let title = step.title;
|
|
476
476
|
if (skipped)
|
|
477
477
|
title = `${title} (skipped${skipped.description ? ": " + skipped.description : ""})`;
|
|
478
478
|
const testStep = {
|
package/lib/util.js
CHANGED
|
@@ -56,7 +56,6 @@ __export(util_exports, {
|
|
|
56
56
|
resolveReporterOutputPath: () => resolveReporterOutputPath,
|
|
57
57
|
sanitizeFilePathBeforeExtension: () => sanitizeFilePathBeforeExtension,
|
|
58
58
|
serializeError: () => serializeError,
|
|
59
|
-
stepTitle: () => stepTitle,
|
|
60
59
|
stripAnsiEscapes: () => stripAnsiEscapes,
|
|
61
60
|
trimLongString: () => trimLongString,
|
|
62
61
|
windowsFilesystemFriendlyLength: () => windowsFilesystemFriendlyLength
|
|
@@ -374,23 +373,6 @@ const ansiRegex = new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*
|
|
|
374
373
|
function stripAnsiEscapes(str) {
|
|
375
374
|
return str.replace(ansiRegex, "");
|
|
376
375
|
}
|
|
377
|
-
function stepTitle(category, title) {
|
|
378
|
-
switch (category) {
|
|
379
|
-
case "fixture":
|
|
380
|
-
return `Fixture ${(0, import_utils.escapeWithQuotes)(title, '"')}`;
|
|
381
|
-
case "expect":
|
|
382
|
-
return `Expect ${(0, import_utils.escapeWithQuotes)(title, '"')}`;
|
|
383
|
-
case "test.step":
|
|
384
|
-
return title;
|
|
385
|
-
case "test.attach":
|
|
386
|
-
return `Attach ${(0, import_utils.escapeWithQuotes)(title, '"')}`;
|
|
387
|
-
case "hook":
|
|
388
|
-
case "pw:api":
|
|
389
|
-
return title;
|
|
390
|
-
default:
|
|
391
|
-
return `[${category}] ${title}`;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
376
|
async function loadTestFilterFile(filePath) {
|
|
395
377
|
try {
|
|
396
378
|
const data = JSON.parse(await import_fs.default.promises.readFile(filePath, "utf8"));
|
|
@@ -437,7 +419,6 @@ async function loadTestFilterFile(filePath) {
|
|
|
437
419
|
resolveReporterOutputPath,
|
|
438
420
|
sanitizeFilePathBeforeExtension,
|
|
439
421
|
serializeError,
|
|
440
|
-
stepTitle,
|
|
441
422
|
stripAnsiEscapes,
|
|
442
423
|
trimLongString,
|
|
443
424
|
windowsFilesystemFriendlyLength
|
|
@@ -35,7 +35,7 @@ class Fixture {
|
|
|
35
35
|
const isUserFixture = this.registration.location && (0, import_util.filterStackFile)(this.registration.location.file);
|
|
36
36
|
const title = this.registration.customTitle || this.registration.name;
|
|
37
37
|
const location = isUserFixture ? this.registration.location : void 0;
|
|
38
|
-
this._stepInfo = { title, category: "fixture", location };
|
|
38
|
+
this._stepInfo = { title: `Fixture ${(0, import_utils.escapeWithQuotes)(title, '"')}`, category: "fixture", location };
|
|
39
39
|
if (this.registration.box)
|
|
40
40
|
this._stepInfo.visibility = isUserFixture ? "hidden" : "internal";
|
|
41
41
|
this._setupDescription = {
|
package/lib/worker/testInfo.js
CHANGED
|
@@ -331,7 +331,7 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
|
|
331
331
|
// ------------ TestInfo methods ------------
|
|
332
332
|
async attach(name, options = {}) {
|
|
333
333
|
const step = this._addStep({
|
|
334
|
-
title: name,
|
|
334
|
+
title: `Attach ${(0, import_utils.escapeWithQuotes)(name, '"')}`,
|
|
335
335
|
category: "test.attach"
|
|
336
336
|
});
|
|
337
337
|
this._attach(await (0, import_util.normalizeAndSaveAttachment)(this.outputPath(), name, options), step.stepId);
|
|
@@ -343,7 +343,7 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
|
|
343
343
|
this._stepMap.get(stepId).attachmentIndices.push(index);
|
|
344
344
|
} else {
|
|
345
345
|
const stepId2 = `attach@${(0, import_utils.createGuid)()}`;
|
|
346
|
-
this._tracing.appendBeforeActionForStep({ stepId: stepId2, title: attachment.name, category: "test.attach", stack: [] });
|
|
346
|
+
this._tracing.appendBeforeActionForStep({ stepId: stepId2, title: `Attach ${(0, import_utils.escapeWithQuotes)(attachment.name, '"')}`, category: "test.attach", stack: [] });
|
|
347
347
|
this._tracing.appendAfterActionForStep(stepId2, void 0, [attachment]);
|
|
348
348
|
}
|
|
349
349
|
this._onAttach({
|
|
@@ -230,7 +230,7 @@ class TestTracing {
|
|
|
230
230
|
startTime: (0, import_utils.monotonicTime)(),
|
|
231
231
|
class: "Test",
|
|
232
232
|
method: options.category,
|
|
233
|
-
title:
|
|
233
|
+
title: options.title,
|
|
234
234
|
params: Object.fromEntries(Object.entries(options.params || {}).map(([name, value]) => [name, generatePreview(value)])),
|
|
235
235
|
stack: options.stack,
|
|
236
236
|
visibility: options.visibility
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright",
|
|
3
|
-
"version": "1.55.0-alpha-2025-08-
|
|
3
|
+
"version": "1.55.0-alpha-2025-08-13",
|
|
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-08-
|
|
59
|
+
"playwright-core": "1.55.0-alpha-2025-08-13"
|
|
60
60
|
},
|
|
61
61
|
"optionalDependencies": {
|
|
62
62
|
"fsevents": "2.3.2"
|
package/types/test.d.ts
CHANGED
|
@@ -4606,9 +4606,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4606
4606
|
* description.
|
|
4607
4607
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4608
4608
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4609
|
-
* @param condition Test is marked as "
|
|
4610
|
-
* @param callback A function that returns whether to mark as "
|
|
4611
|
-
*
|
|
4609
|
+
* @param condition Test is marked as "fixme" when the condition is `true`.
|
|
4610
|
+
* @param callback A function that returns whether to mark as "fixme", based on test fixtures. Test or tests are marked as "fixme"
|
|
4611
|
+
* when the return value is `true`.
|
|
4612
4612
|
* @param description Optional description that will be reflected in a test report.
|
|
4613
4613
|
*/
|
|
4614
4614
|
fixme(title: string, body: TestBody<TestArgs & WorkerArgs>): void;
|
|
@@ -4684,9 +4684,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4684
4684
|
* description.
|
|
4685
4685
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4686
4686
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4687
|
-
* @param condition Test is marked as "
|
|
4688
|
-
* @param callback A function that returns whether to mark as "
|
|
4689
|
-
*
|
|
4687
|
+
* @param condition Test is marked as "fixme" when the condition is `true`.
|
|
4688
|
+
* @param callback A function that returns whether to mark as "fixme", based on test fixtures. Test or tests are marked as "fixme"
|
|
4689
|
+
* when the return value is `true`.
|
|
4690
4690
|
* @param description Optional description that will be reflected in a test report.
|
|
4691
4691
|
*/
|
|
4692
4692
|
fixme(title: string, details: TestDetails, body: TestBody<TestArgs & WorkerArgs>): void;
|
|
@@ -4762,9 +4762,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4762
4762
|
* description.
|
|
4763
4763
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4764
4764
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4765
|
-
* @param condition Test is marked as "
|
|
4766
|
-
* @param callback A function that returns whether to mark as "
|
|
4767
|
-
*
|
|
4765
|
+
* @param condition Test is marked as "fixme" when the condition is `true`.
|
|
4766
|
+
* @param callback A function that returns whether to mark as "fixme", based on test fixtures. Test or tests are marked as "fixme"
|
|
4767
|
+
* when the return value is `true`.
|
|
4768
4768
|
* @param description Optional description that will be reflected in a test report.
|
|
4769
4769
|
*/
|
|
4770
4770
|
fixme(): void;
|
|
@@ -4840,9 +4840,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4840
4840
|
* description.
|
|
4841
4841
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4842
4842
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4843
|
-
* @param condition Test is marked as "
|
|
4844
|
-
* @param callback A function that returns whether to mark as "
|
|
4845
|
-
*
|
|
4843
|
+
* @param condition Test is marked as "fixme" when the condition is `true`.
|
|
4844
|
+
* @param callback A function that returns whether to mark as "fixme", based on test fixtures. Test or tests are marked as "fixme"
|
|
4845
|
+
* when the return value is `true`.
|
|
4846
4846
|
* @param description Optional description that will be reflected in a test report.
|
|
4847
4847
|
*/
|
|
4848
4848
|
fixme(condition: boolean, description?: string): void;
|
|
@@ -4918,9 +4918,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4918
4918
|
* description.
|
|
4919
4919
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4920
4920
|
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4921
|
-
* @param condition Test is marked as "
|
|
4922
|
-
* @param callback A function that returns whether to mark as "
|
|
4923
|
-
*
|
|
4921
|
+
* @param condition Test is marked as "fixme" when the condition is `true`.
|
|
4922
|
+
* @param callback A function that returns whether to mark as "fixme", based on test fixtures. Test or tests are marked as "fixme"
|
|
4923
|
+
* when the return value is `true`.
|
|
4924
4924
|
* @param description Optional description that will be reflected in a test report.
|
|
4925
4925
|
*/
|
|
4926
4926
|
fixme(callback: ConditionBody<TestArgs & WorkerArgs>, description?: string): void;
|