fix(overlay): the Overlay menu page reloads with the menu, not as a full-screen window (1.89.5)

This commit is contained in:
larssand committed 2026-11-10 20:45:35 +01:00
1 parent d5f81f4290
commit 39eaad64ed
6 files changed
+30 -7

No files matched your search

+14
View File
@@ -224,6 +224,20 @@ try {
console.log("PASS decoder diagnostics update without resetting settings draft");
await runOverlaySmoke({ evaluate });
await runOverlayLiveMarksSmoke({ evaluate });
// The Overlay menu page survives a reload (the page reloads itself after npm restart): it must
// come back with the menu, not as a full-screen overlay window.
await navigate("dashboard", "dashboardQuickPractice");
await evaluate(`[...document.querySelectorAll(".nav-item")].find(el => el.textContent === "Overlay")?.click()`);
await waitFor(async () => await evaluate('Boolean(document.getElementById("overlayLaunchObs"))'), "Overlay menu page");
const overlayUrl = await evaluate("location.search");
if (!/view=overlays\b/.test(overlayUrl)) throw new Error("Overlay menu URL: " + overlayUrl);
for (const search of [overlayUrl, "?view=overlay"]) {
await send("Page.navigate", { url: base + "/" + search });
await waitFor(async () => await evaluate('Boolean(document.getElementById("overlayLaunchObs")) && Boolean(document.querySelector(".nav-item"))'), "menu page after reload of " + search);
}
await send("Page.navigate", { url: base + "/?view=overlay&overlayMode=leaderboard" });
await waitFor(async () => await evaluate('!document.getElementById("overlayLaunchObs") && Boolean(document.querySelector("[data-overlay-competitor], .overlay-shell"))'), "a real overlay window stays full screen");
console.log("PASS the Overlay menu page reloads with the menu; an overlay window link stays full screen");
const mobileState = await savedState();
const mobileToken = "browser-mobile-profile-token-1234567890";
mobileState.training ||= {};