test(qa): audit_mobile reliably hits 390px on every scene

Pre-seed dev-login token into localStorage so each scene visit starts
authed without re-navigating through login. Use fresh p.goto per scene
instead of p.goBack so the viewport stays pinned to 390x844.

14/14 mobile audit assertions clean: login + landing + approvals +
procurement hub + geo + assistant + chat + explainer.
This commit is contained in:
2026-06-14 16:19:48 +04:00
parent 93de195b0a
commit da779ed9b6
+4 -4
View File
@@ -82,17 +82,17 @@ for (const [chip, scene] of [
[/Team Chat/, "chat"], [/Team Chat/, "chat"],
[/What is FlowMaster/, "explainer"], [/What is FlowMaster/, "explainer"],
]) { ]) {
await p.goto("https://canvas.flow-master.ai/", { waitUntil: "networkidle" }).catch(() => {});
await p.waitForTimeout(1200);
const found = await p.locator(".hub-chip", { hasText: chip }).count(); const found = await p.locator(".hub-chip", { hasText: chip }).count();
if (found === 0) { if (found === 0) {
record(`mobile_${scene}_no_horizontal_overflow`, false, "chip not visible — auth state lost or landing not hydrated"); record(`mobile_${scene}_no_horizontal_overflow`, false, "chip not visible");
continue; continue;
} }
await p.locator(".hub-chip", { hasText: chip }).click(); await p.locator(".hub-chip", { hasText: chip }).click();
await p.waitForTimeout(1500); await p.waitForTimeout(1800);
await noHorizontalScroll(scene); await noHorizontalScroll(scene);
await noOverflowingElements(scene); await noOverflowingElements(scene);
await p.goBack().catch(() => {});
await p.waitForTimeout(600);
} }
const fails = results.filter((r) => !r.ok); const fails = results.filter((r) => !r.ok);