Add SPA session validation and buglist, update migration docs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-12-03 21:28:08 +00:00
parent 9be3dfc14e
commit cff287e870
24169 changed files with 10223 additions and 7120 deletions

21
node_modules/playwright/lib/worker/workerMain.js generated vendored Normal file → Executable file
View File

@@ -98,6 +98,7 @@ class WorkerMain extends import_process.ProcessRunner {
const fakeTestInfo = new import_testInfo.TestInfoImpl(this._config, this._project, this._params, void 0, 0, () => {
}, () => {
}, () => {
}, () => {
});
const runnable = { type: "teardown" };
await fakeTestInfo._runWithTimeout(runnable, () => this._loadIfNeeded()).catch(() => {
@@ -179,7 +180,7 @@ class WorkerMain extends import_process.ProcessRunner {
let fatalUnknownTestIds;
try {
await this._loadIfNeeded();
const fileSuite = await (0, import_testLoader.loadTestFile)(runPayload.file, this._config.config.rootDir);
const fileSuite = await (0, import_testLoader.loadTestFile)(runPayload.file, this._config);
const suite = (0, import_suiteUtils.bindFileSuiteToProject)(this._project, fileSuite);
if (this._params.repeatEachIndex)
(0, import_suiteUtils.applyRepeatEachIndex)(this._project, suite, this._params.repeatEachIndex);
@@ -222,6 +223,16 @@ class WorkerMain extends import_process.ProcessRunner {
this._runFinished.resolve();
}
}
async customMessage(payload) {
try {
if (this._currentTest?.testId !== payload.testId)
throw new Error("Test has already stopped");
const response = await this._currentTest._onCustomMessageCallback?.(payload.request);
return { response };
} catch (error) {
return { response: {}, error: (0, import_util2.testInfoError)(error) };
}
}
async _runTest(test, retry, nextTest) {
const testInfo = new import_testInfo.TestInfoImpl(
this._config,
@@ -231,7 +242,8 @@ class WorkerMain extends import_process.ProcessRunner {
retry,
(stepBeginPayload) => this.dispatchEvent("stepBegin", stepBeginPayload),
(stepEndPayload) => this.dispatchEvent("stepEnd", stepEndPayload),
(attachment) => this.dispatchEvent("attach", attachment)
(attachment) => this.dispatchEvent("attach", attachment),
(testPausedPayload) => this.dispatchEvent("testPaused", testPausedPayload)
);
const processAnnotation = (annotation) => {
testInfo.annotations.push(annotation);
@@ -318,10 +330,7 @@ class WorkerMain extends import_process.ProcessRunner {
await testInfo._runAsStep({ title: "After Hooks", category: "hook" }, async () => {
let firstAfterHooksError;
try {
await testInfo._runWithTimeout({ type: "test", slot: afterHooksSlot }, async () => {
for (const fn of testInfo._onDidFinishTestFunctions)
await fn();
});
await testInfo._runWithTimeout({ type: "test", slot: afterHooksSlot }, () => testInfo._didFinishTestFunction());
} catch (error) {
firstAfterHooksError = firstAfterHooksError ?? error;
}