@stablyai/internal-playwright 0.1.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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +168 -0
- package/ThirdPartyNotices.txt +6277 -0
- package/cli.js +19 -0
- package/index.d.ts +17 -0
- package/index.js +17 -0
- package/index.mjs +18 -0
- package/jsx-runtime.js +42 -0
- package/jsx-runtime.mjs +21 -0
- package/lib/agents/generateAgents.js +265 -0
- package/lib/agents/generator.md +102 -0
- package/lib/agents/healer.md +78 -0
- package/lib/agents/planner.md +135 -0
- package/lib/cli.js +274 -0
- package/lib/common/config.js +274 -0
- package/lib/common/config.js.map +7 -0
- package/lib/common/configLoader.js +377 -0
- package/lib/common/configLoader.js.map +7 -0
- package/lib/common/esmLoaderHost.js +102 -0
- package/lib/common/esmLoaderHost.js.map +7 -0
- package/lib/common/expectBundle.js +52 -0
- package/lib/common/expectBundle.js.map +7 -0
- package/lib/common/expectBundleImpl.js +389 -0
- package/lib/common/expectBundleImpl.js.map +7 -0
- package/lib/common/fixtures.js +302 -0
- package/lib/common/fixtures.js.map +7 -0
- package/lib/common/globals.js +58 -0
- package/lib/common/globals.js.map +7 -0
- package/lib/common/ipc.js +60 -0
- package/lib/common/ipc.js.map +7 -0
- package/lib/common/poolBuilder.js +85 -0
- package/lib/common/poolBuilder.js.map +7 -0
- package/lib/common/process.js +104 -0
- package/lib/common/process.js.map +7 -0
- package/lib/common/suiteUtils.js +140 -0
- package/lib/common/suiteUtils.js.map +7 -0
- package/lib/common/test.js +321 -0
- package/lib/common/test.js.map +7 -0
- package/lib/common/testLoader.js +100 -0
- package/lib/common/testLoader.js.map +7 -0
- package/lib/common/testType.js +310 -0
- package/lib/common/testType.js.map +7 -0
- package/lib/fsWatcher.js +67 -0
- package/lib/fsWatcher.js.map +7 -0
- package/lib/index.js +696 -0
- package/lib/index.js.map +7 -0
- package/lib/internalsForTest.js +42 -0
- package/lib/internalsForTest.js.map +7 -0
- package/lib/isomorphic/events.js +77 -0
- package/lib/isomorphic/events.js.map +7 -0
- package/lib/isomorphic/folders.js +30 -0
- package/lib/isomorphic/folders.js.map +7 -0
- package/lib/isomorphic/stringInternPool.js +69 -0
- package/lib/isomorphic/stringInternPool.js.map +7 -0
- package/lib/isomorphic/teleReceiver.js +507 -0
- package/lib/isomorphic/teleReceiver.js.map +7 -0
- package/lib/isomorphic/teleSuiteUpdater.js +137 -0
- package/lib/isomorphic/teleSuiteUpdater.js.map +7 -0
- package/lib/isomorphic/testServerConnection.js +211 -0
- package/lib/isomorphic/testServerConnection.js.map +7 -0
- package/lib/isomorphic/testServerInterface.js +16 -0
- package/lib/isomorphic/testServerInterface.js.map +7 -0
- package/lib/isomorphic/testTree.js +334 -0
- package/lib/isomorphic/testTree.js.map +7 -0
- package/lib/isomorphic/types.d.js +16 -0
- package/lib/isomorphic/types.d.js.map +7 -0
- package/lib/loader/loaderMain.js +59 -0
- package/lib/loader/loaderMain.js.map +7 -0
- package/lib/matchers/expect.js +325 -0
- package/lib/matchers/expect.js.map +7 -0
- package/lib/matchers/matcherHint.js +87 -0
- package/lib/matchers/matcherHint.js.map +7 -0
- package/lib/matchers/matchers.js +366 -0
- package/lib/matchers/matchers.js.map +7 -0
- package/lib/matchers/toBeTruthy.js +73 -0
- package/lib/matchers/toBeTruthy.js.map +7 -0
- package/lib/matchers/toEqual.js +99 -0
- package/lib/matchers/toEqual.js.map +7 -0
- package/lib/matchers/toHaveURL.js +102 -0
- package/lib/matchers/toHaveURL.js.map +7 -0
- package/lib/matchers/toMatchAriaSnapshot.js +159 -0
- package/lib/matchers/toMatchAriaSnapshot.js.map +7 -0
- package/lib/matchers/toMatchSnapshot.js +359 -0
- package/lib/matchers/toMatchSnapshot.js.map +7 -0
- package/lib/matchers/toMatchText.js +99 -0
- package/lib/matchers/toMatchText.js.map +7 -0
- package/lib/mcp/browser/actions.d.js +16 -0
- package/lib/mcp/browser/backend.js +93 -0
- package/lib/mcp/browser/backend.js.map +7 -0
- package/lib/mcp/browser/browserContextFactory.js +296 -0
- package/lib/mcp/browser/browserServerBackend.js +76 -0
- package/lib/mcp/browser/codegen.js +66 -0
- package/lib/mcp/browser/config.js +385 -0
- package/lib/mcp/browser/context.js +287 -0
- package/lib/mcp/browser/response.js +228 -0
- package/lib/mcp/browser/sessionLog.js +160 -0
- package/lib/mcp/browser/tab.js +277 -0
- package/lib/mcp/browser/tool.js +30 -0
- package/lib/mcp/browser/tool.js.map +7 -0
- package/lib/mcp/browser/tools/common.js +63 -0
- package/lib/mcp/browser/tools/console.js +44 -0
- package/lib/mcp/browser/tools/dialogs.js +60 -0
- package/lib/mcp/browser/tools/evaluate.js +70 -0
- package/lib/mcp/browser/tools/files.js +58 -0
- package/lib/mcp/browser/tools/form.js +74 -0
- package/lib/mcp/browser/tools/install.js +69 -0
- package/lib/mcp/browser/tools/keyboard.js +85 -0
- package/lib/mcp/browser/tools/mouse.js +107 -0
- package/lib/mcp/browser/tools/navigate.js +62 -0
- package/lib/mcp/browser/tools/network.js +54 -0
- package/lib/mcp/browser/tools/pdf.js +59 -0
- package/lib/mcp/browser/tools/screenshot.js +88 -0
- package/lib/mcp/browser/tools/snapshot.js +182 -0
- package/lib/mcp/browser/tools/tabs.js +67 -0
- package/lib/mcp/browser/tools/tool.js +49 -0
- package/lib/mcp/browser/tools/tracing.js +74 -0
- package/lib/mcp/browser/tools/utils.js +100 -0
- package/lib/mcp/browser/tools/verify.js +154 -0
- package/lib/mcp/browser/tools/wait.js +63 -0
- package/lib/mcp/browser/tools.js +80 -0
- package/lib/mcp/browser/tools.js.map +7 -0
- package/lib/mcp/browser/watchdog.js +44 -0
- package/lib/mcp/config.d.js +16 -0
- package/lib/mcp/extension/cdpRelay.js +351 -0
- package/lib/mcp/extension/extensionContextFactory.js +75 -0
- package/lib/mcp/extension/protocol.js +28 -0
- package/lib/mcp/index.js +61 -0
- package/lib/mcp/log.js +35 -0
- package/lib/mcp/program.js +96 -0
- package/lib/mcp/sdk/bundle.js +81 -0
- package/lib/mcp/sdk/bundle.js.map +7 -0
- package/lib/mcp/sdk/call.js +49 -0
- package/lib/mcp/sdk/call.js.map +7 -0
- package/lib/mcp/sdk/exports.js +32 -0
- package/lib/mcp/sdk/exports.js.map +7 -0
- package/lib/mcp/sdk/http.js +187 -0
- package/lib/mcp/sdk/http.js.map +7 -0
- package/lib/mcp/sdk/inProcessTransport.js +71 -0
- package/lib/mcp/sdk/inProcessTransport.js.map +7 -0
- package/lib/mcp/sdk/mdb.js +206 -0
- package/lib/mcp/sdk/mdb.js.map +7 -0
- package/lib/mcp/sdk/proxyBackend.js +128 -0
- package/lib/mcp/sdk/proxyBackend.js.map +7 -0
- package/lib/mcp/sdk/server.js +189 -0
- package/lib/mcp/sdk/server.js.map +7 -0
- package/lib/mcp/sdk/tool.js +51 -0
- package/lib/mcp/sdk/tool.js.map +7 -0
- package/lib/mcp/test/backend.js +67 -0
- package/lib/mcp/test/backend.js.map +7 -0
- package/lib/mcp/test/browserBackend.js +98 -0
- package/lib/mcp/test/context.js +48 -0
- package/lib/mcp/test/context.js.map +7 -0
- package/lib/mcp/test/generatorTools.js +122 -0
- package/lib/mcp/test/plannerTools.js +46 -0
- package/lib/mcp/test/seed.js +72 -0
- package/lib/mcp/test/streams.js +39 -0
- package/lib/mcp/test/streams.js.map +7 -0
- package/lib/mcp/test/testBackend.js +97 -0
- package/lib/mcp/test/testContext.js +176 -0
- package/lib/mcp/test/testTool.js +30 -0
- package/lib/mcp/test/testTools.js +115 -0
- package/lib/mcp/test/tool.js +30 -0
- package/lib/mcp/test/tool.js.map +7 -0
- package/lib/mcp/test/tools.js +150 -0
- package/lib/mcp/test/tools.js.map +7 -0
- package/lib/mcp/vscode/host.js +187 -0
- package/lib/mcp/vscode/main.js +77 -0
- package/lib/mcpBundleImpl.js +41 -0
- package/lib/mcpBundleImpl.js.map +7 -0
- package/lib/plugins/gitCommitInfoPlugin.js +198 -0
- package/lib/plugins/gitCommitInfoPlugin.js.map +7 -0
- package/lib/plugins/index.js +28 -0
- package/lib/plugins/index.js.map +7 -0
- package/lib/plugins/webServerPlugin.js +209 -0
- package/lib/plugins/webServerPlugin.js.map +7 -0
- package/lib/program.js +412 -0
- package/lib/program.js.map +7 -0
- package/lib/reporters/base.js +609 -0
- package/lib/reporters/base.js.map +7 -0
- package/lib/reporters/blob.js +135 -0
- package/lib/reporters/blob.js.map +7 -0
- package/lib/reporters/dot.js +82 -0
- package/lib/reporters/dot.js.map +7 -0
- package/lib/reporters/empty.js +32 -0
- package/lib/reporters/empty.js.map +7 -0
- package/lib/reporters/github.js +128 -0
- package/lib/reporters/github.js.map +7 -0
- package/lib/reporters/html.js +644 -0
- package/lib/reporters/html.js.map +7 -0
- package/lib/reporters/internalReporter.js +130 -0
- package/lib/reporters/internalReporter.js.map +7 -0
- package/lib/reporters/json.js +254 -0
- package/lib/reporters/json.js.map +7 -0
- package/lib/reporters/junit.js +230 -0
- package/lib/reporters/junit.js.map +7 -0
- package/lib/reporters/line.js +113 -0
- package/lib/reporters/line.js.map +7 -0
- package/lib/reporters/list.js +235 -0
- package/lib/reporters/list.js.map +7 -0
- package/lib/reporters/listModeReporter.js +69 -0
- package/lib/reporters/listModeReporter.js.map +7 -0
- package/lib/reporters/markdown.js +144 -0
- package/lib/reporters/markdown.js.map +7 -0
- package/lib/reporters/merge.js +535 -0
- package/lib/reporters/merge.js.map +7 -0
- package/lib/reporters/multiplexer.js +104 -0
- package/lib/reporters/multiplexer.js.map +7 -0
- package/lib/reporters/reporterV2.js +102 -0
- package/lib/reporters/reporterV2.js.map +7 -0
- package/lib/reporters/teleEmitter.js +297 -0
- package/lib/reporters/teleEmitter.js.map +7 -0
- package/lib/reporters/versions/blobV1.js +16 -0
- package/lib/reporters/versions/blobV1.js.map +7 -0
- package/lib/runner/dispatcher.js +491 -0
- package/lib/runner/dispatcher.js.map +7 -0
- package/lib/runner/failureTracker.js +72 -0
- package/lib/runner/failureTracker.js.map +7 -0
- package/lib/runner/lastRun.js +77 -0
- package/lib/runner/lastRun.js.map +7 -0
- package/lib/runner/loadUtils.js +333 -0
- package/lib/runner/loadUtils.js.map +7 -0
- package/lib/runner/loaderHost.js +89 -0
- package/lib/runner/loaderHost.js.map +7 -0
- package/lib/runner/processHost.js +161 -0
- package/lib/runner/processHost.js.map +7 -0
- package/lib/runner/projectUtils.js +241 -0
- package/lib/runner/projectUtils.js.map +7 -0
- package/lib/runner/rebase.js +189 -0
- package/lib/runner/rebase.js.map +7 -0
- package/lib/runner/reporters.js +137 -0
- package/lib/runner/reporters.js.map +7 -0
- package/lib/runner/runner.js +173 -0
- package/lib/runner/sigIntWatcher.js +96 -0
- package/lib/runner/sigIntWatcher.js.map +7 -0
- package/lib/runner/taskRunner.js +127 -0
- package/lib/runner/taskRunner.js.map +7 -0
- package/lib/runner/tasks.js +410 -0
- package/lib/runner/tasks.js.map +7 -0
- package/lib/runner/testGroups.js +117 -0
- package/lib/runner/testGroups.js.map +7 -0
- package/lib/runner/testRunner.js +390 -0
- package/lib/runner/testRunner.js.map +7 -0
- package/lib/runner/testServer.js +264 -0
- package/lib/runner/testServer.js.map +7 -0
- package/lib/runner/uiMode.js +271 -0
- package/lib/runner/uiModeReporter.js +30 -0
- package/lib/runner/uiModeReporter.js.map +7 -0
- package/lib/runner/vcs.js +72 -0
- package/lib/runner/vcs.js.map +7 -0
- package/lib/runner/watchMode.js +395 -0
- package/lib/runner/watchMode.js.map +7 -0
- package/lib/runner/workerHost.js +95 -0
- package/lib/runner/workerHost.js.map +7 -0
- package/lib/store.js +98 -0
- package/lib/third_party/pirates.js +62 -0
- package/lib/third_party/pirates.js.map +7 -0
- package/lib/third_party/tsconfig-loader.js +103 -0
- package/lib/third_party/tsconfig-loader.js.map +7 -0
- package/lib/transform/babelBundle.js +43 -0
- package/lib/transform/babelBundle.js.map +7 -0
- package/lib/transform/babelBundleImpl.js +461 -0
- package/lib/transform/babelBundleImpl.js.map +7 -0
- package/lib/transform/compilationCache.js +272 -0
- package/lib/transform/compilationCache.js.map +7 -0
- package/lib/transform/esmLoader.js +104 -0
- package/lib/transform/esmLoader.js.map +7 -0
- package/lib/transform/esmUtils.js +32 -0
- package/lib/transform/portTransport.js +67 -0
- package/lib/transform/portTransport.js.map +7 -0
- package/lib/transform/transform.js +293 -0
- package/lib/transform/transform.js.map +7 -0
- package/lib/util.js +403 -0
- package/lib/util.js.map +7 -0
- package/lib/utilsBundle.js +43 -0
- package/lib/utilsBundle.js.map +7 -0
- package/lib/utilsBundleImpl.js +100 -0
- package/lib/utilsBundleImpl.js.map +7 -0
- package/lib/worker/fixtureRunner.js +258 -0
- package/lib/worker/fixtureRunner.js.map +7 -0
- package/lib/worker/stepContext.js +34 -0
- package/lib/worker/testInfo.js +508 -0
- package/lib/worker/testInfo.js.map +7 -0
- package/lib/worker/testTracing.js +344 -0
- package/lib/worker/testTracing.js.map +7 -0
- package/lib/worker/timeoutManager.js +174 -0
- package/lib/worker/timeoutManager.js.map +7 -0
- package/lib/worker/util.js +31 -0
- package/lib/worker/util.js.map +7 -0
- package/lib/worker/workerMain.js +520 -0
- package/lib/worker/workerMain.js.map +7 -0
- package/package.json +74 -0
- package/test.d.ts +18 -0
- package/test.js +24 -0
- package/test.mjs +33 -0
- package/types/test.d.ts +10217 -0
- package/types/testReporter.d.ts +816 -0
@@ -0,0 +1,520 @@
|
|
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 workerMain_exports = {};
|
20
|
+
__export(workerMain_exports, {
|
21
|
+
WorkerMain: () => WorkerMain,
|
22
|
+
create: () => create
|
23
|
+
});
|
24
|
+
module.exports = __toCommonJS(workerMain_exports);
|
25
|
+
var import_utils = require("playwright-core/lib/utils");
|
26
|
+
var import_utils2 = require("playwright-core/lib/utils");
|
27
|
+
var import_configLoader = require("../common/configLoader");
|
28
|
+
var import_globals = require("../common/globals");
|
29
|
+
var import_ipc = require("../common/ipc");
|
30
|
+
var import_util = require("../util");
|
31
|
+
var import_fixtureRunner = require("./fixtureRunner");
|
32
|
+
var import_testInfo = require("./testInfo");
|
33
|
+
var import_util2 = require("./util");
|
34
|
+
var import_fixtures = require("../common/fixtures");
|
35
|
+
var import_poolBuilder = require("../common/poolBuilder");
|
36
|
+
var import_process = require("../common/process");
|
37
|
+
var import_suiteUtils = require("../common/suiteUtils");
|
38
|
+
var import_testLoader = require("../common/testLoader");
|
39
|
+
class WorkerMain extends import_process.ProcessRunner {
|
40
|
+
constructor(params) {
|
41
|
+
super();
|
42
|
+
// Accumulated fatal errors that cannot be attributed to a test.
|
43
|
+
this._fatalErrors = [];
|
44
|
+
// The stage of the full cleanup. Once "finished", we can safely stop running anything.
|
45
|
+
this._didRunFullCleanup = false;
|
46
|
+
// Whether the worker was stopped due to an unhandled error in a test marked with test.fail().
|
47
|
+
// This should force dispatcher to use a new worker instead.
|
48
|
+
this._stoppedDueToUnhandledErrorInTestFail = false;
|
49
|
+
// Whether the worker was requested to stop.
|
50
|
+
this._isStopped = false;
|
51
|
+
// This promise resolves once the single "run test group" call finishes.
|
52
|
+
this._runFinished = new import_utils.ManualPromise();
|
53
|
+
this._currentTest = null;
|
54
|
+
this._lastRunningTests = [];
|
55
|
+
this._totalRunningTests = 0;
|
56
|
+
// Suites that had their beforeAll hooks, but not afterAll hooks executed.
|
57
|
+
// These suites still need afterAll hooks to be executed for the proper cleanup.
|
58
|
+
// Contains dynamic annotations originated by modifiers with a callback, e.g. `test.skip(() => true)`.
|
59
|
+
this._activeSuites = /* @__PURE__ */ new Map();
|
60
|
+
process.env.TEST_WORKER_INDEX = String(params.workerIndex);
|
61
|
+
process.env.TEST_PARALLEL_INDEX = String(params.parallelIndex);
|
62
|
+
(0, import_globals.setIsWorkerProcess)();
|
63
|
+
this._params = params;
|
64
|
+
this._fixtureRunner = new import_fixtureRunner.FixtureRunner();
|
65
|
+
this._runFinished.resolve();
|
66
|
+
process.on("unhandledRejection", (reason) => this.unhandledError(reason));
|
67
|
+
process.on("uncaughtException", (error) => this.unhandledError(error));
|
68
|
+
process.stdout.write = (chunk, cb) => {
|
69
|
+
this.dispatchEvent("stdOut", (0, import_ipc.stdioChunkToParams)(chunk));
|
70
|
+
this._currentTest?._tracing.appendStdioToTrace("stdout", chunk);
|
71
|
+
if (typeof cb === "function")
|
72
|
+
process.nextTick(cb);
|
73
|
+
return true;
|
74
|
+
};
|
75
|
+
if (!process.env.PW_RUNNER_DEBUG) {
|
76
|
+
process.stderr.write = (chunk, cb) => {
|
77
|
+
this.dispatchEvent("stdErr", (0, import_ipc.stdioChunkToParams)(chunk));
|
78
|
+
this._currentTest?._tracing.appendStdioToTrace("stderr", chunk);
|
79
|
+
if (typeof cb === "function")
|
80
|
+
process.nextTick(cb);
|
81
|
+
return true;
|
82
|
+
};
|
83
|
+
}
|
84
|
+
}
|
85
|
+
_stop() {
|
86
|
+
if (!this._isStopped) {
|
87
|
+
this._isStopped = true;
|
88
|
+
this._currentTest?._interrupt();
|
89
|
+
}
|
90
|
+
return this._runFinished;
|
91
|
+
}
|
92
|
+
async gracefullyClose() {
|
93
|
+
try {
|
94
|
+
await this._stop();
|
95
|
+
if (!this._config) {
|
96
|
+
return;
|
97
|
+
}
|
98
|
+
const fakeTestInfo = new import_testInfo.TestInfoImpl(this._config, this._project, this._params, void 0, 0, () => {
|
99
|
+
}, () => {
|
100
|
+
}, () => {
|
101
|
+
});
|
102
|
+
const runnable = { type: "teardown" };
|
103
|
+
await fakeTestInfo._runWithTimeout(runnable, () => this._loadIfNeeded()).catch(() => {
|
104
|
+
});
|
105
|
+
await this._fixtureRunner.teardownScope("test", fakeTestInfo, runnable).catch(() => {
|
106
|
+
});
|
107
|
+
await this._fixtureRunner.teardownScope("worker", fakeTestInfo, runnable).catch(() => {
|
108
|
+
});
|
109
|
+
await fakeTestInfo._runWithTimeout(runnable, () => (0, import_utils.gracefullyCloseAll)()).catch(() => {
|
110
|
+
});
|
111
|
+
this._fatalErrors.push(...fakeTestInfo.errors);
|
112
|
+
} catch (e) {
|
113
|
+
this._fatalErrors.push((0, import_util2.testInfoError)(e));
|
114
|
+
}
|
115
|
+
if (this._fatalErrors.length) {
|
116
|
+
this._appendProcessTeardownDiagnostics(this._fatalErrors[this._fatalErrors.length - 1]);
|
117
|
+
const payload = { fatalErrors: this._fatalErrors };
|
118
|
+
this.dispatchEvent("teardownErrors", payload);
|
119
|
+
}
|
120
|
+
}
|
121
|
+
_appendProcessTeardownDiagnostics(error) {
|
122
|
+
if (!this._lastRunningTests.length)
|
123
|
+
return;
|
124
|
+
const count = this._totalRunningTests === 1 ? "1 test" : `${this._totalRunningTests} tests`;
|
125
|
+
let lastMessage = "";
|
126
|
+
if (this._lastRunningTests.length < this._totalRunningTests)
|
127
|
+
lastMessage = `, last ${this._lastRunningTests.length} tests were`;
|
128
|
+
const message = [
|
129
|
+
"",
|
130
|
+
"",
|
131
|
+
import_utils2.colors.red(`Failed worker ran ${count}${lastMessage}:`),
|
132
|
+
...this._lastRunningTests.map((test) => formatTestTitle(test, this._project.project.name))
|
133
|
+
].join("\n");
|
134
|
+
if (error.message) {
|
135
|
+
if (error.stack) {
|
136
|
+
let index = error.stack.indexOf(error.message);
|
137
|
+
if (index !== -1) {
|
138
|
+
index += error.message.length;
|
139
|
+
error.stack = error.stack.substring(0, index) + message + error.stack.substring(index);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
error.message += message;
|
143
|
+
} else if (error.value) {
|
144
|
+
error.value += message;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
unhandledError(error) {
|
148
|
+
if (!this._currentTest) {
|
149
|
+
if (!this._fatalErrors.length)
|
150
|
+
this._fatalErrors.push((0, import_util2.testInfoError)(error));
|
151
|
+
void this._stop();
|
152
|
+
return;
|
153
|
+
}
|
154
|
+
if (!this._currentTest._hasUnhandledError) {
|
155
|
+
this._currentTest._hasUnhandledError = true;
|
156
|
+
this._currentTest._failWithError(error);
|
157
|
+
}
|
158
|
+
const isExpectError = error instanceof Error && !!error.matcherResult;
|
159
|
+
const shouldContinueInThisWorker = this._currentTest.expectedStatus === "failed" && isExpectError;
|
160
|
+
if (!shouldContinueInThisWorker) {
|
161
|
+
this._stoppedDueToUnhandledErrorInTestFail = true;
|
162
|
+
void this._stop();
|
163
|
+
}
|
164
|
+
}
|
165
|
+
async _loadIfNeeded() {
|
166
|
+
if (this._config)
|
167
|
+
return;
|
168
|
+
const config = await (0, import_configLoader.deserializeConfig)(this._params.config);
|
169
|
+
const project = config.projects.find((p) => p.id === this._params.projectId);
|
170
|
+
if (!project)
|
171
|
+
throw new Error(`Project "${this._params.projectId}" not found in the worker process. Make sure project name does not change.`);
|
172
|
+
this._config = config;
|
173
|
+
this._project = project;
|
174
|
+
this._poolBuilder = import_poolBuilder.PoolBuilder.createForWorker(this._project);
|
175
|
+
}
|
176
|
+
async runTestGroup(runPayload) {
|
177
|
+
this._runFinished = new import_utils.ManualPromise();
|
178
|
+
const entries = new Map(runPayload.entries.map((e) => [e.testId, e]));
|
179
|
+
let fatalUnknownTestIds;
|
180
|
+
try {
|
181
|
+
await this._loadIfNeeded();
|
182
|
+
const fileSuite = await (0, import_testLoader.loadTestFile)(runPayload.file, this._config.config.rootDir);
|
183
|
+
const suite = (0, import_suiteUtils.bindFileSuiteToProject)(this._project, fileSuite);
|
184
|
+
if (this._params.repeatEachIndex)
|
185
|
+
(0, import_suiteUtils.applyRepeatEachIndex)(this._project, suite, this._params.repeatEachIndex);
|
186
|
+
const hasEntries = (0, import_suiteUtils.filterTestsRemoveEmptySuites)(suite, (test) => entries.has(test.id));
|
187
|
+
if (hasEntries) {
|
188
|
+
this._poolBuilder.buildPools(suite);
|
189
|
+
this._activeSuites = /* @__PURE__ */ new Map();
|
190
|
+
this._didRunFullCleanup = false;
|
191
|
+
const tests = suite.allTests();
|
192
|
+
for (let i = 0; i < tests.length; i++) {
|
193
|
+
if (this._isStopped && this._didRunFullCleanup)
|
194
|
+
break;
|
195
|
+
const entry = entries.get(tests[i].id);
|
196
|
+
entries.delete(tests[i].id);
|
197
|
+
(0, import_util.debugTest)(`test started "${tests[i].title}"`);
|
198
|
+
await this._runTest(tests[i], entry.retry, tests[i + 1]);
|
199
|
+
(0, import_util.debugTest)(`test finished "${tests[i].title}"`);
|
200
|
+
}
|
201
|
+
} else {
|
202
|
+
fatalUnknownTestIds = runPayload.entries.map((e) => e.testId);
|
203
|
+
void this._stop();
|
204
|
+
}
|
205
|
+
} catch (e) {
|
206
|
+
this._fatalErrors.push((0, import_util2.testInfoError)(e));
|
207
|
+
void this._stop();
|
208
|
+
} finally {
|
209
|
+
const donePayload = {
|
210
|
+
fatalErrors: this._fatalErrors,
|
211
|
+
skipTestsDueToSetupFailure: [],
|
212
|
+
fatalUnknownTestIds,
|
213
|
+
stoppedDueToUnhandledErrorInTestFail: this._stoppedDueToUnhandledErrorInTestFail
|
214
|
+
};
|
215
|
+
for (const test of this._skipRemainingTestsInSuite?.allTests() || []) {
|
216
|
+
if (entries.has(test.id))
|
217
|
+
donePayload.skipTestsDueToSetupFailure.push(test.id);
|
218
|
+
}
|
219
|
+
this.dispatchEvent("done", donePayload);
|
220
|
+
this._fatalErrors = [];
|
221
|
+
this._skipRemainingTestsInSuite = void 0;
|
222
|
+
this._runFinished.resolve();
|
223
|
+
}
|
224
|
+
}
|
225
|
+
async _runTest(test, retry, nextTest) {
|
226
|
+
const testInfo = new import_testInfo.TestInfoImpl(
|
227
|
+
this._config,
|
228
|
+
this._project,
|
229
|
+
this._params,
|
230
|
+
test,
|
231
|
+
retry,
|
232
|
+
(stepBeginPayload) => this.dispatchEvent("stepBegin", stepBeginPayload),
|
233
|
+
(stepEndPayload) => this.dispatchEvent("stepEnd", stepEndPayload),
|
234
|
+
(attachment) => this.dispatchEvent("attach", attachment)
|
235
|
+
);
|
236
|
+
const processAnnotation = (annotation) => {
|
237
|
+
testInfo.annotations.push(annotation);
|
238
|
+
switch (annotation.type) {
|
239
|
+
case "fixme":
|
240
|
+
case "skip":
|
241
|
+
testInfo.expectedStatus = "skipped";
|
242
|
+
break;
|
243
|
+
case "fail":
|
244
|
+
if (testInfo.expectedStatus !== "skipped")
|
245
|
+
testInfo.expectedStatus = "failed";
|
246
|
+
break;
|
247
|
+
case "slow":
|
248
|
+
testInfo._timeoutManager.slow();
|
249
|
+
break;
|
250
|
+
}
|
251
|
+
};
|
252
|
+
if (!this._isStopped)
|
253
|
+
this._fixtureRunner.setPool(test._pool);
|
254
|
+
const suites = getSuites(test);
|
255
|
+
const reversedSuites = suites.slice().reverse();
|
256
|
+
const nextSuites = new Set(getSuites(nextTest));
|
257
|
+
testInfo._timeoutManager.setTimeout(test.timeout);
|
258
|
+
for (const annotation of test.annotations)
|
259
|
+
processAnnotation(annotation);
|
260
|
+
for (const suite of suites) {
|
261
|
+
const extraAnnotations = this._activeSuites.get(suite) || [];
|
262
|
+
for (const annotation of extraAnnotations)
|
263
|
+
processAnnotation(annotation);
|
264
|
+
}
|
265
|
+
this._currentTest = testInfo;
|
266
|
+
(0, import_globals.setCurrentTestInfo)(testInfo);
|
267
|
+
this.dispatchEvent("testBegin", buildTestBeginPayload(testInfo));
|
268
|
+
const isSkipped = testInfo.expectedStatus === "skipped";
|
269
|
+
const hasAfterAllToRunBeforeNextTest = reversedSuites.some((suite) => {
|
270
|
+
return this._activeSuites.has(suite) && !nextSuites.has(suite) && suite._hooks.some((hook) => hook.type === "afterAll");
|
271
|
+
});
|
272
|
+
if (isSkipped && nextTest && !hasAfterAllToRunBeforeNextTest) {
|
273
|
+
testInfo.status = "skipped";
|
274
|
+
this.dispatchEvent("testEnd", buildTestEndPayload(testInfo));
|
275
|
+
return;
|
276
|
+
}
|
277
|
+
this._totalRunningTests++;
|
278
|
+
this._lastRunningTests.push(test);
|
279
|
+
if (this._lastRunningTests.length > 10)
|
280
|
+
this._lastRunningTests.shift();
|
281
|
+
let shouldRunAfterEachHooks = false;
|
282
|
+
testInfo._allowSkips = true;
|
283
|
+
await (async () => {
|
284
|
+
await testInfo._runWithTimeout({ type: "test" }, async () => {
|
285
|
+
const traceFixtureRegistration = test._pool.resolve("trace");
|
286
|
+
if (!traceFixtureRegistration)
|
287
|
+
return;
|
288
|
+
if (typeof traceFixtureRegistration.fn === "function")
|
289
|
+
throw new Error(`"trace" option cannot be a function`);
|
290
|
+
await testInfo._tracing.startIfNeeded(traceFixtureRegistration.fn);
|
291
|
+
});
|
292
|
+
if (this._isStopped || isSkipped) {
|
293
|
+
testInfo.status = "skipped";
|
294
|
+
return;
|
295
|
+
}
|
296
|
+
await (0, import_utils.removeFolders)([testInfo.outputDir]);
|
297
|
+
let testFunctionParams = null;
|
298
|
+
await testInfo._runAsStep({ title: "Before Hooks", category: "hook" }, async () => {
|
299
|
+
for (const suite of suites)
|
300
|
+
await this._runBeforeAllHooksForSuite(suite, testInfo);
|
301
|
+
shouldRunAfterEachHooks = true;
|
302
|
+
await this._runEachHooksForSuites(suites, "beforeEach", testInfo);
|
303
|
+
testFunctionParams = await this._fixtureRunner.resolveParametersForFunction(test.fn, testInfo, "test", { type: "test" });
|
304
|
+
});
|
305
|
+
if (testFunctionParams === null) {
|
306
|
+
return;
|
307
|
+
}
|
308
|
+
await testInfo._runWithTimeout({ type: "test" }, async () => {
|
309
|
+
const fn = test.fn;
|
310
|
+
await fn(testFunctionParams, testInfo);
|
311
|
+
});
|
312
|
+
})().catch(() => {
|
313
|
+
});
|
314
|
+
testInfo.duration = testInfo._timeoutManager.defaultSlot().elapsed | 0;
|
315
|
+
testInfo._allowSkips = true;
|
316
|
+
const afterHooksTimeout = calculateMaxTimeout(this._project.project.timeout, testInfo.timeout);
|
317
|
+
const afterHooksSlot = { timeout: afterHooksTimeout, elapsed: 0 };
|
318
|
+
await testInfo._runAsStep({ title: "After Hooks", category: "hook" }, async () => {
|
319
|
+
let firstAfterHooksError;
|
320
|
+
try {
|
321
|
+
await testInfo._runWithTimeout({ type: "test", slot: afterHooksSlot }, async () => {
|
322
|
+
for (const fn of testInfo._onDidFinishTestFunctions)
|
323
|
+
await fn();
|
324
|
+
});
|
325
|
+
} catch (error) {
|
326
|
+
firstAfterHooksError = firstAfterHooksError ?? error;
|
327
|
+
}
|
328
|
+
try {
|
329
|
+
if (shouldRunAfterEachHooks)
|
330
|
+
await this._runEachHooksForSuites(reversedSuites, "afterEach", testInfo, afterHooksSlot);
|
331
|
+
} catch (error) {
|
332
|
+
firstAfterHooksError = firstAfterHooksError ?? error;
|
333
|
+
}
|
334
|
+
testInfo._tracing.didFinishTestFunctionAndAfterEachHooks();
|
335
|
+
try {
|
336
|
+
await this._fixtureRunner.teardownScope("test", testInfo, { type: "test", slot: afterHooksSlot });
|
337
|
+
} catch (error) {
|
338
|
+
firstAfterHooksError = firstAfterHooksError ?? error;
|
339
|
+
}
|
340
|
+
for (const suite of reversedSuites) {
|
341
|
+
if (!nextSuites.has(suite) || testInfo._isFailure()) {
|
342
|
+
try {
|
343
|
+
await this._runAfterAllHooksForSuite(suite, testInfo);
|
344
|
+
} catch (error) {
|
345
|
+
firstAfterHooksError = firstAfterHooksError ?? error;
|
346
|
+
}
|
347
|
+
}
|
348
|
+
}
|
349
|
+
if (firstAfterHooksError)
|
350
|
+
throw firstAfterHooksError;
|
351
|
+
}).catch(() => {
|
352
|
+
});
|
353
|
+
if (testInfo._isFailure())
|
354
|
+
this._isStopped = true;
|
355
|
+
if (this._isStopped) {
|
356
|
+
this._didRunFullCleanup = true;
|
357
|
+
await testInfo._runAsStep({ title: "Worker Cleanup", category: "hook" }, async () => {
|
358
|
+
let firstWorkerCleanupError;
|
359
|
+
const teardownSlot = { timeout: this._project.project.timeout, elapsed: 0 };
|
360
|
+
try {
|
361
|
+
await this._fixtureRunner.teardownScope("test", testInfo, { type: "test", slot: teardownSlot });
|
362
|
+
} catch (error) {
|
363
|
+
firstWorkerCleanupError = firstWorkerCleanupError ?? error;
|
364
|
+
}
|
365
|
+
for (const suite of reversedSuites) {
|
366
|
+
try {
|
367
|
+
await this._runAfterAllHooksForSuite(suite, testInfo);
|
368
|
+
} catch (error) {
|
369
|
+
firstWorkerCleanupError = firstWorkerCleanupError ?? error;
|
370
|
+
}
|
371
|
+
}
|
372
|
+
try {
|
373
|
+
await this._fixtureRunner.teardownScope("worker", testInfo, { type: "teardown", slot: teardownSlot });
|
374
|
+
} catch (error) {
|
375
|
+
firstWorkerCleanupError = firstWorkerCleanupError ?? error;
|
376
|
+
}
|
377
|
+
if (firstWorkerCleanupError)
|
378
|
+
throw firstWorkerCleanupError;
|
379
|
+
}).catch(() => {
|
380
|
+
});
|
381
|
+
}
|
382
|
+
const tracingSlot = { timeout: this._project.project.timeout, elapsed: 0 };
|
383
|
+
await testInfo._runWithTimeout({ type: "test", slot: tracingSlot }, async () => {
|
384
|
+
await testInfo._tracing.stopIfNeeded();
|
385
|
+
}).catch(() => {
|
386
|
+
});
|
387
|
+
testInfo.duration = testInfo._timeoutManager.defaultSlot().elapsed + afterHooksSlot.elapsed | 0;
|
388
|
+
this._currentTest = null;
|
389
|
+
(0, import_globals.setCurrentTestInfo)(null);
|
390
|
+
this.dispatchEvent("testEnd", buildTestEndPayload(testInfo));
|
391
|
+
const preserveOutput = this._config.config.preserveOutput === "always" || this._config.config.preserveOutput === "failures-only" && testInfo._isFailure();
|
392
|
+
if (!preserveOutput)
|
393
|
+
await (0, import_utils.removeFolders)([testInfo.outputDir]);
|
394
|
+
}
|
395
|
+
_collectHooksAndModifiers(suite, type, testInfo) {
|
396
|
+
const runnables = [];
|
397
|
+
for (const modifier of suite._modifiers) {
|
398
|
+
const modifierType = this._fixtureRunner.dependsOnWorkerFixturesOnly(modifier.fn, modifier.location) ? "beforeAll" : "beforeEach";
|
399
|
+
if (modifierType !== type)
|
400
|
+
continue;
|
401
|
+
const fn = async (fixtures) => {
|
402
|
+
const result = await modifier.fn(fixtures);
|
403
|
+
testInfo._modifier(modifier.type, modifier.location, [!!result, modifier.description]);
|
404
|
+
};
|
405
|
+
(0, import_fixtures.inheritFixtureNames)(modifier.fn, fn);
|
406
|
+
runnables.push({
|
407
|
+
title: `${modifier.type} modifier`,
|
408
|
+
location: modifier.location,
|
409
|
+
type: modifier.type,
|
410
|
+
fn
|
411
|
+
});
|
412
|
+
}
|
413
|
+
runnables.push(...suite._hooks.filter((hook) => hook.type === type));
|
414
|
+
return runnables;
|
415
|
+
}
|
416
|
+
async _runBeforeAllHooksForSuite(suite, testInfo) {
|
417
|
+
if (this._activeSuites.has(suite))
|
418
|
+
return;
|
419
|
+
const extraAnnotations = [];
|
420
|
+
this._activeSuites.set(suite, extraAnnotations);
|
421
|
+
await this._runAllHooksForSuite(suite, testInfo, "beforeAll", extraAnnotations);
|
422
|
+
}
|
423
|
+
async _runAllHooksForSuite(suite, testInfo, type, extraAnnotations) {
|
424
|
+
let firstError;
|
425
|
+
for (const hook of this._collectHooksAndModifiers(suite, type, testInfo)) {
|
426
|
+
try {
|
427
|
+
await testInfo._runAsStep({ title: hook.title, category: "hook", location: hook.location }, async () => {
|
428
|
+
const timeSlot = { timeout: this._project.project.timeout, elapsed: 0 };
|
429
|
+
const runnable = { type: hook.type, slot: timeSlot, location: hook.location };
|
430
|
+
const existingAnnotations = new Set(testInfo.annotations);
|
431
|
+
try {
|
432
|
+
await this._fixtureRunner.resolveParametersAndRunFunction(hook.fn, testInfo, "all-hooks-only", runnable);
|
433
|
+
} finally {
|
434
|
+
if (extraAnnotations) {
|
435
|
+
const newAnnotations = testInfo.annotations.filter((a) => !existingAnnotations.has(a));
|
436
|
+
extraAnnotations.push(...newAnnotations);
|
437
|
+
}
|
438
|
+
await this._fixtureRunner.teardownScope("test", testInfo, runnable);
|
439
|
+
}
|
440
|
+
});
|
441
|
+
} catch (error) {
|
442
|
+
firstError = firstError ?? error;
|
443
|
+
if (type === "beforeAll" && error instanceof import_testInfo.TestSkipError)
|
444
|
+
break;
|
445
|
+
if (type === "beforeAll" && !this._skipRemainingTestsInSuite) {
|
446
|
+
this._skipRemainingTestsInSuite = suite;
|
447
|
+
}
|
448
|
+
}
|
449
|
+
}
|
450
|
+
if (firstError)
|
451
|
+
throw firstError;
|
452
|
+
}
|
453
|
+
async _runAfterAllHooksForSuite(suite, testInfo) {
|
454
|
+
if (!this._activeSuites.has(suite))
|
455
|
+
return;
|
456
|
+
this._activeSuites.delete(suite);
|
457
|
+
await this._runAllHooksForSuite(suite, testInfo, "afterAll");
|
458
|
+
}
|
459
|
+
async _runEachHooksForSuites(suites, type, testInfo, slot) {
|
460
|
+
let firstError;
|
461
|
+
const hooks = suites.map((suite) => this._collectHooksAndModifiers(suite, type, testInfo)).flat();
|
462
|
+
for (const hook of hooks) {
|
463
|
+
const runnable = { type: hook.type, location: hook.location, slot };
|
464
|
+
if (testInfo._timeoutManager.isTimeExhaustedFor(runnable)) {
|
465
|
+
continue;
|
466
|
+
}
|
467
|
+
try {
|
468
|
+
await testInfo._runAsStep({ title: hook.title, category: "hook", location: hook.location }, async () => {
|
469
|
+
await this._fixtureRunner.resolveParametersAndRunFunction(hook.fn, testInfo, "test", runnable);
|
470
|
+
});
|
471
|
+
} catch (error) {
|
472
|
+
firstError = firstError ?? error;
|
473
|
+
if (error instanceof import_testInfo.TestSkipError)
|
474
|
+
break;
|
475
|
+
}
|
476
|
+
}
|
477
|
+
if (firstError)
|
478
|
+
throw firstError;
|
479
|
+
}
|
480
|
+
}
|
481
|
+
function buildTestBeginPayload(testInfo) {
|
482
|
+
return {
|
483
|
+
testId: testInfo.testId,
|
484
|
+
startWallTime: testInfo._startWallTime
|
485
|
+
};
|
486
|
+
}
|
487
|
+
function buildTestEndPayload(testInfo) {
|
488
|
+
return {
|
489
|
+
testId: testInfo.testId,
|
490
|
+
duration: testInfo.duration,
|
491
|
+
status: testInfo.status,
|
492
|
+
errors: testInfo.errors,
|
493
|
+
hasNonRetriableError: testInfo._hasNonRetriableError,
|
494
|
+
expectedStatus: testInfo.expectedStatus,
|
495
|
+
annotations: testInfo.annotations,
|
496
|
+
timeout: testInfo.timeout
|
497
|
+
};
|
498
|
+
}
|
499
|
+
function getSuites(test) {
|
500
|
+
const suites = [];
|
501
|
+
for (let suite = test?.parent; suite; suite = suite.parent)
|
502
|
+
suites.push(suite);
|
503
|
+
suites.reverse();
|
504
|
+
return suites;
|
505
|
+
}
|
506
|
+
function formatTestTitle(test, projectName) {
|
507
|
+
const [, ...titles] = test.titlePath();
|
508
|
+
const location = `${(0, import_util.relativeFilePath)(test.location.file)}:${test.location.line}:${test.location.column}`;
|
509
|
+
const projectTitle = projectName ? `[${projectName}] \u203A ` : "";
|
510
|
+
return `${projectTitle}${location} \u203A ${titles.join(" \u203A ")}`;
|
511
|
+
}
|
512
|
+
function calculateMaxTimeout(t1, t2) {
|
513
|
+
return !t1 || !t2 ? 0 : Math.max(t1, t2);
|
514
|
+
}
|
515
|
+
const create = (params) => new WorkerMain(params);
|
516
|
+
// Annotate the CommonJS export names for ESM import in node:
|
517
|
+
0 && (module.exports = {
|
518
|
+
WorkerMain,
|
519
|
+
create
|
520
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../src/worker/workerMain.ts"],
|
4
|
+
"sourcesContent": ["/**\n * Copyright Microsoft Corporation. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ManualPromise, gracefullyCloseAll, removeFolders } from 'playwright-core/lib/utils';\nimport { colors } from 'playwright-core/lib/utils';\n\nimport { deserializeConfig } from '../common/configLoader';\nimport { setCurrentTestInfo, setIsWorkerProcess } from '../common/globals';\nimport { stdioChunkToParams } from '../common/ipc';\nimport { debugTest, relativeFilePath } from '../util';\nimport { FixtureRunner } from './fixtureRunner';\nimport { TestSkipError, TestInfoImpl } from './testInfo';\nimport { testInfoError } from './util';\nimport { inheritFixtureNames } from '../common/fixtures';\nimport { PoolBuilder } from '../common/poolBuilder';\nimport { ProcessRunner } from '../common/process';\nimport { applyRepeatEachIndex, bindFileSuiteToProject, filterTestsRemoveEmptySuites } from '../common/suiteUtils';\nimport { loadTestFile } from '../common/testLoader';\n\nimport type { TimeSlot } from './timeoutManager';\nimport type { Location } from '../../types/testReporter';\nimport type { FullConfigInternal, FullProjectInternal } from '../common/config';\nimport type { DonePayload, RunPayload, TeardownErrorsPayload, TestBeginPayload, TestEndPayload, TestInfoErrorImpl, WorkerInitParams } from '../common/ipc';\nimport type { Suite, TestCase } from '../common/test';\nimport type { TestAnnotation } from '../../types/test';\n\nexport class WorkerMain extends ProcessRunner {\n private _params: WorkerInitParams;\n private _config!: FullConfigInternal;\n private _project!: FullProjectInternal;\n private _poolBuilder!: PoolBuilder;\n private _fixtureRunner: FixtureRunner;\n\n // Accumulated fatal errors that cannot be attributed to a test.\n private _fatalErrors: TestInfoErrorImpl[] = [];\n // Whether we should skip running remaining tests in this suite because\n // of a setup error, usually beforeAll hook.\n private _skipRemainingTestsInSuite: Suite | undefined;\n // The stage of the full cleanup. Once \"finished\", we can safely stop running anything.\n private _didRunFullCleanup = false;\n // Whether the worker was requested to stop.\n private _isStopped = false;\n // This promise resolves once the single \"run test group\" call finishes.\n private _runFinished = new ManualPromise<void>();\n private _currentTest: TestInfoImpl | null = null;\n private _lastRunningTests: TestCase[] = [];\n private _totalRunningTests = 0;\n // Suites that had their beforeAll hooks, but not afterAll hooks executed.\n // These suites still need afterAll hooks to be executed for the proper cleanup.\n // Contains dynamic annotations originated by modifiers with a callback, e.g. `test.skip(() => true)`.\n private _activeSuites = new Map<Suite, TestAnnotation[]>();\n\n constructor(params: WorkerInitParams) {\n super();\n process.env.TEST_WORKER_INDEX = String(params.workerIndex);\n process.env.TEST_PARALLEL_INDEX = String(params.parallelIndex);\n setIsWorkerProcess();\n\n this._params = params;\n this._fixtureRunner = new FixtureRunner();\n\n // Resolve this promise, so worker does not stall waiting for the non-existent run to finish,\n // when it was sopped before running any test group.\n this._runFinished.resolve();\n\n process.on('unhandledRejection', reason => this.unhandledError(reason));\n process.on('uncaughtException', error => this.unhandledError(error));\n // eslint-disable-next-line no-restricted-properties\n process.stdout.write = (chunk: string | Buffer, cb?: any) => {\n this.dispatchEvent('stdOut', stdioChunkToParams(chunk));\n this._currentTest?._tracing.appendStdioToTrace('stdout', chunk);\n if (typeof cb === 'function')\n process.nextTick(cb);\n return true;\n };\n\n if (!process.env.PW_RUNNER_DEBUG) {\n // eslint-disable-next-line no-restricted-properties\n process.stderr.write = (chunk: string | Buffer, cb?: any) => {\n this.dispatchEvent('stdErr', stdioChunkToParams(chunk));\n this._currentTest?._tracing.appendStdioToTrace('stderr', chunk);\n if (typeof cb === 'function')\n process.nextTick(cb);\n return true;\n };\n }\n }\n\n private _stop(): Promise<void> {\n if (!this._isStopped) {\n this._isStopped = true;\n this._currentTest?._interrupt();\n }\n return this._runFinished;\n }\n\n override async gracefullyClose() {\n try {\n await this._stop();\n if (!this._config) {\n // We never set anything up and we can crash on attempting cleanup\n return;\n }\n // Ignore top-level errors, they are already inside TestInfo.errors.\n const fakeTestInfo = new TestInfoImpl(this._config, this._project, this._params, undefined, 0, () => {}, () => {}, () => {});\n const runnable = { type: 'teardown' } as const;\n // We have to load the project to get the right deadline below.\n await fakeTestInfo._runWithTimeout(runnable, () => this._loadIfNeeded()).catch(() => {});\n await this._fixtureRunner.teardownScope('test', fakeTestInfo, runnable).catch(() => {});\n await this._fixtureRunner.teardownScope('worker', fakeTestInfo, runnable).catch(() => {});\n // Close any other browsers launched in this process. This includes anything launched\n // manually in the test/hooks and internal browsers like Playwright Inspector.\n await fakeTestInfo._runWithTimeout(runnable, () => gracefullyCloseAll()).catch(() => {});\n this._fatalErrors.push(...fakeTestInfo.errors);\n } catch (e) {\n this._fatalErrors.push(testInfoError(e));\n }\n\n if (this._fatalErrors.length) {\n this._appendProcessTeardownDiagnostics(this._fatalErrors[this._fatalErrors.length - 1]);\n const payload: TeardownErrorsPayload = { fatalErrors: this._fatalErrors };\n this.dispatchEvent('teardownErrors', payload);\n }\n }\n\n private _appendProcessTeardownDiagnostics(error: TestInfoErrorImpl) {\n if (!this._lastRunningTests.length)\n return;\n const count = this._totalRunningTests === 1 ? '1 test' : `${this._totalRunningTests} tests`;\n let lastMessage = '';\n if (this._lastRunningTests.length < this._totalRunningTests)\n lastMessage = `, last ${this._lastRunningTests.length} tests were`;\n const message = [\n '',\n '',\n colors.red(`Failed worker ran ${count}${lastMessage}:`),\n ...this._lastRunningTests.map(test => formatTestTitle(test, this._project.project.name)),\n ].join('\\n');\n if (error.message) {\n if (error.stack) {\n let index = error.stack.indexOf(error.message);\n if (index !== -1) {\n index += error.message.length;\n error.stack = error.stack.substring(0, index) + message + error.stack.substring(index);\n }\n }\n error.message += message;\n } else if (error.value) {\n error.value += message;\n }\n }\n\n unhandledError(error: Error | any) {\n // No current test - fatal error.\n if (!this._currentTest) {\n if (!this._fatalErrors.length)\n this._fatalErrors.push(testInfoError(error));\n void this._stop();\n return;\n }\n\n // We do not differentiate between errors in the control flow\n // and unhandled errors - both lead to the test failing. This is good for regular tests,\n // so that you can, e.g. expect() from inside an event handler. The test fails,\n // and we restart the worker.\n if (!this._currentTest._hasUnhandledError) {\n this._currentTest._hasUnhandledError = true;\n this._currentTest._failWithError(error);\n }\n\n // For tests marked with test.fail(), this might be a problem when unhandled error\n // is not coming from the user test code (legit failure), but from fixtures or test runner.\n //\n // Ideally, we would mark this test as \"failed unexpectedly\" and show that in the report.\n // However, we do not have such a special test status, so the test will be considered ok (failed as expected).\n //\n // To avoid messing up future tests, we forcefully stop the worker, unless it is\n // an expect() error which we know does not mess things up.\n const isExpectError = (error instanceof Error) && !!(error as any).matcherResult;\n const shouldContinueInThisWorker = this._currentTest.expectedStatus === 'failed' && isExpectError;\n if (!shouldContinueInThisWorker)\n void this._stop();\n }\n\n private async _loadIfNeeded() {\n if (this._config)\n return;\n\n const config = await deserializeConfig(this._params.config);\n const project = config.projects.find(p => p.id === this._params.projectId);\n if (!project)\n throw new Error(`Project \"${this._params.projectId}\" not found in the worker process. Make sure project name does not change.`);\n this._config = config;\n this._project = project;\n this._poolBuilder = PoolBuilder.createForWorker(this._project);\n }\n\n async runTestGroup(runPayload: RunPayload) {\n this._runFinished = new ManualPromise<void>();\n const entries = new Map(runPayload.entries.map(e => [e.testId, e]));\n let fatalUnknownTestIds: string[] | undefined;\n try {\n await this._loadIfNeeded();\n const fileSuite = await loadTestFile(runPayload.file, this._config.config.rootDir);\n const suite = bindFileSuiteToProject(this._project, fileSuite);\n if (this._params.repeatEachIndex)\n applyRepeatEachIndex(this._project, suite, this._params.repeatEachIndex);\n const hasEntries = filterTestsRemoveEmptySuites(suite, test => entries.has(test.id));\n if (hasEntries) {\n this._poolBuilder.buildPools(suite);\n this._activeSuites = new Map();\n this._didRunFullCleanup = false;\n const tests = suite.allTests();\n for (let i = 0; i < tests.length; i++) {\n // Do not run tests after full cleanup, because we are entirely done.\n if (this._isStopped && this._didRunFullCleanup)\n break;\n const entry = entries.get(tests[i].id)!;\n entries.delete(tests[i].id);\n debugTest(`test started \"${tests[i].title}\"`);\n await this._runTest(tests[i], entry.retry, tests[i + 1]);\n debugTest(`test finished \"${tests[i].title}\"`);\n }\n } else {\n fatalUnknownTestIds = runPayload.entries.map(e => e.testId);\n void this._stop();\n }\n } catch (e) {\n // In theory, we should run above code without any errors.\n // However, in the case we screwed up, or loadTestFile failed in the worker\n // but not in the runner, let's do a fatal error.\n this._fatalErrors.push(testInfoError(e));\n void this._stop();\n } finally {\n const donePayload: DonePayload = {\n fatalErrors: this._fatalErrors,\n skipTestsDueToSetupFailure: [],\n fatalUnknownTestIds\n };\n for (const test of this._skipRemainingTestsInSuite?.allTests() || []) {\n if (entries.has(test.id))\n donePayload.skipTestsDueToSetupFailure.push(test.id);\n }\n this.dispatchEvent('done', donePayload);\n this._fatalErrors = [];\n this._skipRemainingTestsInSuite = undefined;\n this._runFinished.resolve();\n }\n }\n\n private async _runTest(test: TestCase, retry: number, nextTest: TestCase | undefined) {\n const testInfo = new TestInfoImpl(this._config, this._project, this._params, test, retry,\n stepBeginPayload => this.dispatchEvent('stepBegin', stepBeginPayload),\n stepEndPayload => this.dispatchEvent('stepEnd', stepEndPayload),\n attachment => this.dispatchEvent('attach', attachment));\n\n const processAnnotation = (annotation: TestAnnotation) => {\n testInfo.annotations.push(annotation);\n switch (annotation.type) {\n case 'fixme':\n case 'skip':\n testInfo.expectedStatus = 'skipped';\n break;\n case 'fail':\n if (testInfo.expectedStatus !== 'skipped')\n testInfo.expectedStatus = 'failed';\n break;\n case 'slow':\n testInfo._timeoutManager.slow();\n break;\n }\n };\n\n if (!this._isStopped)\n this._fixtureRunner.setPool(test._pool!);\n\n const suites = getSuites(test);\n const reversedSuites = suites.slice().reverse();\n const nextSuites = new Set(getSuites(nextTest));\n\n testInfo._timeoutManager.setTimeout(test.timeout);\n for (const annotation of test.annotations)\n processAnnotation(annotation);\n\n // Process existing annotations dynamically set for parent suites.\n for (const suite of suites) {\n const extraAnnotations = this._activeSuites.get(suite) || [];\n for (const annotation of extraAnnotations)\n processAnnotation(annotation);\n }\n\n this._currentTest = testInfo;\n setCurrentTestInfo(testInfo);\n this.dispatchEvent('testBegin', buildTestBeginPayload(testInfo));\n\n const isSkipped = testInfo.expectedStatus === 'skipped';\n const hasAfterAllToRunBeforeNextTest = reversedSuites.some(suite => {\n return this._activeSuites.has(suite) && !nextSuites.has(suite) && suite._hooks.some(hook => hook.type === 'afterAll');\n });\n if (isSkipped && nextTest && !hasAfterAllToRunBeforeNextTest) {\n // Fast path - this test is skipped, and there are more tests that will handle cleanup.\n testInfo.status = 'skipped';\n this.dispatchEvent('testEnd', buildTestEndPayload(testInfo));\n return;\n }\n\n this._totalRunningTests++;\n this._lastRunningTests.push(test);\n if (this._lastRunningTests.length > 10)\n this._lastRunningTests.shift();\n let shouldRunAfterEachHooks = false;\n\n testInfo._allowSkips = true;\n\n await (async () => {\n await testInfo._runWithTimeout({ type: 'test' }, async () => {\n // Ideally, \"trace\" would be an config-level option belonging to the\n // test runner instead of a fixture belonging to Playwright.\n // However, for backwards compatibility, we have to read it from a fixture today.\n // We decided to not introduce the config-level option just yet.\n const traceFixtureRegistration = test._pool!.resolve('trace');\n if (!traceFixtureRegistration)\n return;\n if (typeof traceFixtureRegistration.fn === 'function')\n throw new Error(`\"trace\" option cannot be a function`);\n await testInfo._tracing.startIfNeeded(traceFixtureRegistration.fn);\n });\n\n if (this._isStopped || isSkipped) {\n // Two reasons to get here:\n // - Last test is skipped, so we should not run the test, but run the cleanup.\n // - Worker is requested to stop, but was not able to run full cleanup yet.\n // We should skip the test, but run the cleanup.\n testInfo.status = 'skipped';\n return;\n }\n\n await removeFolders([testInfo.outputDir]);\n\n let testFunctionParams: object | null = null;\n await testInfo._runAsStep({ title: 'Before Hooks', category: 'hook' }, async () => {\n // Run \"beforeAll\" hooks, unless already run during previous tests.\n for (const suite of suites)\n await this._runBeforeAllHooksForSuite(suite, testInfo);\n\n // Run \"beforeEach\" hooks. Once started with \"beforeEach\", we must run all \"afterEach\" hooks as well.\n shouldRunAfterEachHooks = true;\n await this._runEachHooksForSuites(suites, 'beforeEach', testInfo);\n\n // Setup fixtures required by the test.\n testFunctionParams = await this._fixtureRunner.resolveParametersForFunction(test.fn, testInfo, 'test', { type: 'test' });\n });\n\n if (testFunctionParams === null) {\n // Fixture setup failed or was skipped, we should not run the test now.\n return;\n }\n\n await testInfo._runWithTimeout({ type: 'test' }, async () => {\n // Now run the test itself.\n const fn = test.fn; // Extract a variable to get a better stack trace (\"myTest\" vs \"TestCase.myTest [as fn]\").\n await fn(testFunctionParams, testInfo);\n });\n })().catch(() => {}); // Ignore the top-level error, it is already inside TestInfo.errors.\n\n // Update duration, so it is available in fixture teardown and afterEach hooks.\n testInfo.duration = testInfo._timeoutManager.defaultSlot().elapsed | 0;\n\n // No skips in after hooks.\n testInfo._allowSkips = true;\n\n // After hooks get an additional timeout.\n const afterHooksTimeout = calculateMaxTimeout(this._project.project.timeout, testInfo.timeout);\n const afterHooksSlot = { timeout: afterHooksTimeout, elapsed: 0 };\n await testInfo._runAsStep({ title: 'After Hooks', category: 'hook' }, async () => {\n let firstAfterHooksError: Error | undefined;\n\n try {\n // Run \"immediately upon test function finish\" callback.\n await testInfo._runWithTimeout({ type: 'test', slot: afterHooksSlot }, async () => testInfo._onDidFinishTestFunction?.());\n } catch (error) {\n firstAfterHooksError = firstAfterHooksError ?? error;\n }\n\n try {\n // Run \"afterEach\" hooks, unless we failed at beforeAll stage.\n if (shouldRunAfterEachHooks)\n await this._runEachHooksForSuites(reversedSuites, 'afterEach', testInfo, afterHooksSlot);\n } catch (error) {\n firstAfterHooksError = firstAfterHooksError ?? error;\n }\n\n testInfo._tracing.didFinishTestFunctionAndAfterEachHooks();\n\n try {\n // Teardown test-scoped fixtures. Attribute to 'test' so that users understand\n // they should probably increase the test timeout to fix this issue.\n await this._fixtureRunner.teardownScope('test', testInfo, { type: 'test', slot: afterHooksSlot });\n } catch (error) {\n firstAfterHooksError = firstAfterHooksError ?? error;\n }\n\n // Run \"afterAll\" hooks for suites that are not shared with the next test.\n // In case of failure the worker will be stopped and we have to make sure that afterAll\n // hooks run before worker fixtures teardown.\n for (const suite of reversedSuites) {\n if (!nextSuites.has(suite) || testInfo._isFailure()) {\n try {\n await this._runAfterAllHooksForSuite(suite, testInfo);\n } catch (error) {\n // Continue running \"afterAll\" hooks even after some of them timeout.\n firstAfterHooksError = firstAfterHooksError ?? error;\n }\n }\n }\n if (firstAfterHooksError)\n throw firstAfterHooksError;\n }).catch(() => {}); // Ignore the top-level error, it is already inside TestInfo.errors.\n\n if (testInfo._isFailure())\n this._isStopped = true;\n\n if (this._isStopped) {\n // Run all remaining \"afterAll\" hooks and teardown all fixtures when worker is shutting down.\n // Mark as \"cleaned up\" early to avoid running cleanup twice.\n this._didRunFullCleanup = true;\n\n await testInfo._runAsStep({ title: 'Worker Cleanup', category: 'hook' }, async () => {\n let firstWorkerCleanupError: Error | undefined;\n\n // Give it more time for the full cleanup.\n const teardownSlot = { timeout: this._project.project.timeout, elapsed: 0 };\n try {\n // Attribute to 'test' so that users understand they should probably increate the test timeout to fix this issue.\n await this._fixtureRunner.teardownScope('test', testInfo, { type: 'test', slot: teardownSlot });\n } catch (error) {\n firstWorkerCleanupError = firstWorkerCleanupError ?? error;\n }\n\n for (const suite of reversedSuites) {\n try {\n await this._runAfterAllHooksForSuite(suite, testInfo);\n } catch (error) {\n firstWorkerCleanupError = firstWorkerCleanupError ?? error;\n }\n }\n\n try {\n // Attribute to 'teardown' because worker fixtures are not perceived as a part of a test.\n await this._fixtureRunner.teardownScope('worker', testInfo, { type: 'teardown', slot: teardownSlot });\n } catch (error) {\n firstWorkerCleanupError = firstWorkerCleanupError ?? error;\n }\n\n if (firstWorkerCleanupError)\n throw firstWorkerCleanupError;\n }).catch(() => {}); // Ignore the top-level error, it is already inside TestInfo.errors.\n }\n\n const tracingSlot = { timeout: this._project.project.timeout, elapsed: 0 };\n await testInfo._runWithTimeout({ type: 'test', slot: tracingSlot }, async () => {\n await testInfo._tracing.stopIfNeeded();\n }).catch(() => {}); // Ignore the top-level error, it is already inside TestInfo.errors.\n\n testInfo.duration = (testInfo._timeoutManager.defaultSlot().elapsed + afterHooksSlot.elapsed) | 0;\n\n this._currentTest = null;\n setCurrentTestInfo(null);\n this.dispatchEvent('testEnd', buildTestEndPayload(testInfo));\n\n const preserveOutput = this._config.config.preserveOutput === 'always' ||\n (this._config.config.preserveOutput === 'failures-only' && testInfo._isFailure());\n if (!preserveOutput)\n await removeFolders([testInfo.outputDir]);\n }\n\n private _collectHooksAndModifiers(suite: Suite, type: 'beforeAll' | 'beforeEach' | 'afterAll' | 'afterEach', testInfo: TestInfoImpl) {\n type Runnable = { type: 'beforeEach' | 'afterEach' | 'beforeAll' | 'afterAll' | 'fixme' | 'skip' | 'slow' | 'fail', fn: Function, title: string, location: Location };\n const runnables: Runnable[] = [];\n for (const modifier of suite._modifiers) {\n const modifierType = this._fixtureRunner.dependsOnWorkerFixturesOnly(modifier.fn, modifier.location) ? 'beforeAll' : 'beforeEach';\n if (modifierType !== type)\n continue;\n const fn = async (fixtures: any) => {\n const result = await modifier.fn(fixtures);\n testInfo._modifier(modifier.type, modifier.location, [!!result, modifier.description]);\n };\n inheritFixtureNames(modifier.fn, fn);\n runnables.push({\n title: `${modifier.type} modifier`,\n location: modifier.location,\n type: modifier.type,\n fn,\n });\n }\n // Modifiers first, then hooks.\n runnables.push(...suite._hooks.filter(hook => hook.type === type));\n return runnables;\n }\n\n private async _runBeforeAllHooksForSuite(suite: Suite, testInfo: TestInfoImpl) {\n if (this._activeSuites.has(suite))\n return;\n const extraAnnotations: TestAnnotation[] = [];\n this._activeSuites.set(suite, extraAnnotations);\n await this._runAllHooksForSuite(suite, testInfo, 'beforeAll', extraAnnotations);\n }\n\n private async _runAllHooksForSuite(suite: Suite, testInfo: TestInfoImpl, type: 'beforeAll' | 'afterAll', extraAnnotations?: TestAnnotation[]) {\n // Always run all the hooks, and capture the first error.\n let firstError: Error | undefined;\n for (const hook of this._collectHooksAndModifiers(suite, type, testInfo)) {\n try {\n await testInfo._runAsStep({ title: hook.title, category: 'hook', location: hook.location }, async () => {\n // Separate time slot for each beforeAll/afterAll hook.\n const timeSlot = { timeout: this._project.project.timeout, elapsed: 0 };\n const runnable = { type: hook.type, slot: timeSlot, location: hook.location };\n const existingAnnotations = new Set(testInfo.annotations);\n try {\n await this._fixtureRunner.resolveParametersAndRunFunction(hook.fn, testInfo, 'all-hooks-only', runnable);\n } finally {\n if (extraAnnotations) {\n // Inherit all annotations defined in the beforeAll/modifer to all tests in the suite.\n const newAnnotations = testInfo.annotations.filter(a => !existingAnnotations.has(a));\n extraAnnotations.push(...newAnnotations);\n }\n // Each beforeAll/afterAll hook has its own scope for test fixtures. Attribute to the same runnable and timeSlot.\n // Note: we must teardown even after hook fails, because we'll run more hooks.\n await this._fixtureRunner.teardownScope('test', testInfo, runnable);\n }\n });\n } catch (error) {\n firstError = firstError ?? error;\n // Skip in beforeAll/modifier prevents others from running.\n if (type === 'beforeAll' && (error instanceof TestSkipError))\n break;\n if (type === 'beforeAll' && !this._skipRemainingTestsInSuite) {\n // This will inform dispatcher that we should not run more tests from this group\n // because we had a beforeAll error.\n // This behavior avoids getting the same common error for each test.\n this._skipRemainingTestsInSuite = suite;\n }\n }\n }\n if (firstError)\n throw firstError;\n }\n\n private async _runAfterAllHooksForSuite(suite: Suite, testInfo: TestInfoImpl) {\n if (!this._activeSuites.has(suite))\n return;\n this._activeSuites.delete(suite);\n await this._runAllHooksForSuite(suite, testInfo, 'afterAll');\n }\n\n private async _runEachHooksForSuites(suites: Suite[], type: 'beforeEach' | 'afterEach', testInfo: TestInfoImpl, slot?: TimeSlot) {\n // Always run all the hooks, unless one of the times out, and capture the first error.\n let firstError: Error | undefined;\n const hooks = suites.map(suite => this._collectHooksAndModifiers(suite, type, testInfo)).flat();\n for (const hook of hooks) {\n const runnable = { type: hook.type, location: hook.location, slot };\n if (testInfo._timeoutManager.isTimeExhaustedFor(runnable)) {\n // Do not run hooks that will timeout right away.\n continue;\n }\n try {\n await testInfo._runAsStep({ title: hook.title, category: 'hook', location: hook.location }, async () => {\n await this._fixtureRunner.resolveParametersAndRunFunction(hook.fn, testInfo, 'test', runnable);\n });\n } catch (error) {\n firstError = firstError ?? error;\n // Skip in modifier prevents others from running.\n if (error instanceof TestSkipError)\n break;\n }\n }\n if (firstError)\n throw firstError;\n }\n}\n\nfunction buildTestBeginPayload(testInfo: TestInfoImpl): TestBeginPayload {\n return {\n testId: testInfo.testId,\n startWallTime: testInfo._startWallTime,\n };\n}\n\nfunction buildTestEndPayload(testInfo: TestInfoImpl): TestEndPayload {\n return {\n testId: testInfo.testId,\n duration: testInfo.duration,\n status: testInfo.status!,\n errors: testInfo.errors,\n hasNonRetriableError: testInfo._hasNonRetriableError,\n expectedStatus: testInfo.expectedStatus,\n annotations: testInfo.annotations,\n timeout: testInfo.timeout,\n };\n}\n\nfunction getSuites(test: TestCase | undefined): Suite[] {\n const suites: Suite[] = [];\n for (let suite: Suite | undefined = test?.parent; suite; suite = suite.parent)\n suites.push(suite);\n suites.reverse(); // Put root suite first.\n return suites;\n}\n\nfunction formatTestTitle(test: TestCase, projectName: string) {\n // file, ...describes, test\n const [, ...titles] = test.titlePath();\n const location = `${relativeFilePath(test.location.file)}:${test.location.line}:${test.location.column}`;\n const projectTitle = projectName ? `[${projectName}] \u203A ` : '';\n return `${projectTitle}${location} \u203A ${titles.join(' \u203A ')}`;\n}\n\nfunction calculateMaxTimeout(t1: number, t2: number) {\n // Zero means \"no timeout\".\n return (!t1 || !t2) ? 0 : Math.max(t1, t2);\n}\n\nexport const create = (params: WorkerInitParams) => new WorkerMain(params);\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,mBAAiE;AACjE,IAAAA,gBAAuB;AAEvB,0BAAkC;AAClC,qBAAuD;AACvD,iBAAmC;AACnC,kBAA4C;AAC5C,2BAA8B;AAC9B,sBAA4C;AAC5C,I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