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

28
node_modules/playwright/lib/runner/dispatcher.js generated vendored Normal file → Executable file
View File

@@ -26,6 +26,8 @@ var import_utils2 = require("playwright-core/lib/utils");
var import_rebase = require("./rebase");
var import_workerHost = require("./workerHost");
var import_ipc = require("../common/ipc");
var import_internalReporter = require("../reporters/internalReporter");
var import_util = require("../util");
class Dispatcher {
constructor(config, reporter, failureTracker) {
this._workerSlots = [];
@@ -70,7 +72,7 @@ class Dispatcher {
return;
}
this._queue.splice(jobIndex, 1);
const jobDispatcher = new JobDispatcher(job, this._reporter, this._failureTracker, () => this.stop().catch(() => {
const jobDispatcher = new JobDispatcher(job, this._config, this._reporter, this._failureTracker, () => this.stop().catch(() => {
}));
this._workerSlots[workerIndex].busy = true;
this._workerSlots[workerIndex].jobDispatcher = jobDispatcher;
@@ -209,7 +211,7 @@ class Dispatcher {
}
}
class JobDispatcher {
constructor(job, reporter, failureTracker, stopCallback) {
constructor(job, config, reporter, failureTracker, stopCallback) {
this.jobResult = new import_utils.ManualPromise();
this._listeners = [];
this._failedTests = /* @__PURE__ */ new Set();
@@ -219,6 +221,7 @@ class JobDispatcher {
this._parallelIndex = 0;
this._workerIndex = 0;
this.job = job;
this._config = config;
this._reporter = reporter;
this._failureTracker = failureTracker;
this._stopCallback = stopCallback;
@@ -449,10 +452,30 @@ class JobDispatcher {
import_utils.eventsHelper.addEventListener(worker, "stepBegin", this._onStepBegin.bind(this)),
import_utils.eventsHelper.addEventListener(worker, "stepEnd", this._onStepEnd.bind(this)),
import_utils.eventsHelper.addEventListener(worker, "attach", this._onAttach.bind(this)),
import_utils.eventsHelper.addEventListener(worker, "testPaused", this._onTestPaused.bind(this, worker)),
import_utils.eventsHelper.addEventListener(worker, "done", this._onDone.bind(this)),
import_utils.eventsHelper.addEventListener(worker, "exit", this.onExit.bind(this))
];
}
_onTestPaused(worker, params) {
const sendMessage = async (message) => {
try {
if (this.jobResult.isDone())
throw new Error("Test has already stopped");
const response = await worker.sendCustomMessage({ testId: params.testId, request: message.request });
if (response.error)
(0, import_internalReporter.addLocationAndSnippetToError)(this._config.config, response.error);
return response;
} catch (e) {
const error = (0, import_util.serializeError)(e);
(0, import_internalReporter.addLocationAndSnippetToError)(this._config.config, error);
return { response: void 0, error };
}
};
for (const error of params.errors)
(0, import_internalReporter.addLocationAndSnippetToError)(this._config.config, error);
this._failureTracker.onTestPaused?.({ ...params, sendMessage });
}
skipWholeJob() {
const allTestsSkipped = this.job.tests.every((test) => test.expectedStatus === "skipped");
if (allTestsSkipped && !this._failureTracker.hasReachedMaxFailures()) {
@@ -460,6 +483,7 @@ class JobDispatcher {
const result = test._appendTestResult();
this._reporter.onTestBegin?.(test, result);
result.status = "skipped";
result.annotations = [...test.annotations];
this._reportTestEnd(test, result);
}
return true;