playwright 1.55.0-alpha-2025-08-13 → 1.55.0-alpha-2025-08-15

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.

@@ -95,6 +95,7 @@ class WorkerMain extends import_process.ProcessRunner {
95
95
  const fakeTestInfo = new import_testInfo.TestInfoImpl(this._config, this._project, this._params, void 0, 0, () => {
96
96
  }, () => {
97
97
  }, () => {
98
+ }, () => {
98
99
  });
99
100
  const runnable = { type: "teardown" };
100
101
  await fakeTestInfo._runWithTimeout(runnable, () => this._loadIfNeeded()).catch(() => {
@@ -216,6 +217,9 @@ class WorkerMain extends import_process.ProcessRunner {
216
217
  this._runFinished.resolve();
217
218
  }
218
219
  }
220
+ resumeAfterStepError(params) {
221
+ this._currentTest?.resumeAfterStepError(params);
222
+ }
219
223
  async _runTest(test, retry, nextTest) {
220
224
  const testInfo = new import_testInfo.TestInfoImpl(
221
225
  this._config,
@@ -224,6 +228,7 @@ class WorkerMain extends import_process.ProcessRunner {
224
228
  test,
225
229
  retry,
226
230
  (stepBeginPayload) => this.dispatchEvent("stepBegin", stepBeginPayload),
231
+ (stepRecoverFromErrorPayload) => this.dispatchEvent("stepRecoverFromError", stepRecoverFromErrorPayload),
227
232
  (stepEndPayload) => this.dispatchEvent("stepEnd", stepEndPayload),
228
233
  (attachment) => this.dispatchEvent("attach", attachment)
229
234
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright",
3
- "version": "1.55.0-alpha-2025-08-13",
3
+ "version": "1.55.0-alpha-2025-08-15",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,6 +28,7 @@
28
28
  "./lib/transform/transform": "./lib/transform/transform.js",
29
29
  "./lib/internalsForTest": "./lib/internalsForTest.js",
30
30
  "./lib/plugins": "./lib/plugins/index.js",
31
+ "./lib/runner/testRunner": "./lib/runner/testRunner.js",
31
32
  "./jsx-runtime": {
32
33
  "import": "./jsx-runtime.mjs",
33
34
  "require": "./jsx-runtime.js",
@@ -56,7 +57,7 @@
56
57
  },
57
58
  "license": "Apache-2.0",
58
59
  "dependencies": {
59
- "playwright-core": "1.55.0-alpha-2025-08-13"
60
+ "playwright-core": "1.55.0-alpha-2025-08-15"
60
61
  },
61
62
  "optionalDependencies": {
62
63
  "fsevents": "2.3.2"
@@ -1,110 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var runner_exports = {};
20
- __export(runner_exports, {
21
- Runner: () => Runner
22
- });
23
- module.exports = __toCommonJS(runner_exports);
24
- var import_lastRun = require("./lastRun");
25
- var import_projectUtils = require("./projectUtils");
26
- var import_reporters = require("./reporters");
27
- var import_tasks = require("./tasks");
28
- var import_gitCommitInfoPlugin = require("../plugins/gitCommitInfoPlugin");
29
- var import_webServerPlugin = require("../plugins/webServerPlugin");
30
- var import_base = require("../reporters/base");
31
- var import_internalReporter = require("../reporters/internalReporter");
32
- var import_compilationCache = require("../transform/compilationCache");
33
- class Runner {
34
- constructor(config) {
35
- this._config = config;
36
- }
37
- async listTestFiles(projectNames) {
38
- const projects = (0, import_projectUtils.filterProjects)(this._config.projects, projectNames);
39
- const report = {
40
- projects: []
41
- };
42
- for (const project of projects) {
43
- report.projects.push({
44
- name: project.project.name,
45
- testDir: project.project.testDir,
46
- use: { testIdAttribute: project.project.use.testIdAttribute },
47
- files: await (0, import_projectUtils.collectFilesForProject)(project)
48
- });
49
- }
50
- return report;
51
- }
52
- async runAllTests() {
53
- const config = this._config;
54
- const listOnly = config.cliListOnly;
55
- (0, import_gitCommitInfoPlugin.addGitCommitInfoPlugin)(config);
56
- (0, import_webServerPlugin.webServerPluginsForConfig)(config).forEach((p) => config.plugins.push({ factory: p }));
57
- const reporters = await (0, import_reporters.createReporters)(config, listOnly ? "list" : "test", false);
58
- const lastRun = new import_lastRun.LastRunReporter(config);
59
- if (config.cliLastFailed)
60
- await lastRun.filterLastFailed();
61
- const reporter = new import_internalReporter.InternalReporter([...reporters, lastRun]);
62
- const tasks = listOnly ? [
63
- (0, import_tasks.createLoadTask)("in-process", { failOnLoadErrors: true, filterOnly: false }),
64
- (0, import_tasks.createReportBeginTask)()
65
- ] : [
66
- (0, import_tasks.createApplyRebaselinesTask)(),
67
- ...(0, import_tasks.createGlobalSetupTasks)(config),
68
- (0, import_tasks.createLoadTask)("in-process", { filterOnly: true, failOnLoadErrors: true }),
69
- ...(0, import_tasks.createRunTestsTasks)(config)
70
- ];
71
- const status = await (0, import_tasks.runTasks)(new import_tasks.TestRun(config, reporter), tasks, config.config.globalTimeout);
72
- await new Promise((resolve) => process.stdout.write("", () => resolve()));
73
- await new Promise((resolve) => process.stderr.write("", () => resolve()));
74
- return status;
75
- }
76
- async findRelatedTestFiles(files) {
77
- const errorReporter = (0, import_reporters.createErrorCollectingReporter)(import_base.terminalScreen);
78
- const reporter = new import_internalReporter.InternalReporter([errorReporter]);
79
- const status = await (0, import_tasks.runTasks)(new import_tasks.TestRun(this._config, reporter), [
80
- ...(0, import_tasks.createPluginSetupTasks)(this._config),
81
- (0, import_tasks.createLoadTask)("in-process", { failOnLoadErrors: true, filterOnly: false, populateDependencies: true })
82
- ]);
83
- if (status !== "passed")
84
- return { errors: errorReporter.errors(), testFiles: [] };
85
- return { testFiles: (0, import_compilationCache.affectedTestFiles)(files) };
86
- }
87
- async runDevServer() {
88
- const reporter = new import_internalReporter.InternalReporter([(0, import_reporters.createErrorCollectingReporter)(import_base.terminalScreen, true)]);
89
- const status = await (0, import_tasks.runTasks)(new import_tasks.TestRun(this._config, reporter), [
90
- ...(0, import_tasks.createPluginSetupTasks)(this._config),
91
- (0, import_tasks.createLoadTask)("in-process", { failOnLoadErrors: true, filterOnly: false }),
92
- (0, import_tasks.createStartDevServerTask)(),
93
- { title: "wait until interrupted", setup: async () => new Promise(() => {
94
- }) }
95
- ]);
96
- return { status };
97
- }
98
- async clearCache() {
99
- const reporter = new import_internalReporter.InternalReporter([(0, import_reporters.createErrorCollectingReporter)(import_base.terminalScreen, true)]);
100
- const status = await (0, import_tasks.runTasks)(new import_tasks.TestRun(this._config, reporter), [
101
- ...(0, import_tasks.createPluginSetupTasks)(this._config),
102
- (0, import_tasks.createClearCacheTask)(this._config)
103
- ]);
104
- return { status };
105
- }
106
- }
107
- // Annotate the CommonJS export names for ESM import in node:
108
- 0 && (module.exports = {
109
- Runner
110
- });