fix all overlays

This commit is contained in:
larssand
2026-09-08 18:26:30 +02:00
parent d0889736d0
commit 8aedf83826
9 changed files with 197 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
import { runOverlaySmoke } from "./browser_overlays.js";
import { runRaceSetupSmoke } from "./browser_race_setup.js";
import assert from "node:assert/strict";
import { spawn } from "node:child_process";
import { existsSync, mkdtempSync, rmSync } from "node:fs";
@@ -105,6 +107,7 @@ try {
assert.ok(await evaluate(`document.getElementById("view").textContent.includes(${JSON.stringify(fields.name + " Updated")})`));
console.log("PASS create/edit/reload and draft retention: " + collection);
}
await runRaceSetupSmoke({ evaluate, navigate, fill, savedState, waitFor, pause });
await navigate("classes", "classForm");
await send("Network.emulateNetworkConditions", { offline: true, latency: 0, downloadThroughput: -1, uploadThroughput: -1 });
await fill("classForm", { name: "Offline Draft" });
@@ -115,6 +118,7 @@ try {
await evaluate('document.getElementById("syncStatusRetry").click()');
await waitFor(async () => (await savedState()).classes.some(item => item.name === "Offline Draft"), "retry persisted draft");
await waitFor(async () => (await status()) === "saved", "confirmed saved status");
await runOverlaySmoke({ evaluate });
assert.deepEqual(errors, []);
console.log("PASS offline save failure, local draft retention, retry and confirmed saved status");
} finally {