The new topbar badge on the Chat tab (chatThreadCount > 0) broke the old /^\\s*Chat\\s*$/ regex. Switched to a Playwright filter chain: .tab filtered by hasText 'Chat' AND hasNotText 'Assistant' (which also contains 'Chat' substring elsewhere in DOM). All 4 QA suites green: - 36/36 dogfood (chat_sidebar threads=8 previews=8 times=8) - 12/12 buyer-script (Approvals action disabled? true) - 8/8 idle-poll (0 reqs at 30s on every scene) - 14/14 mobile (390px clean)
16 lines
959 B
JavaScript
16 lines
959 B
JavaScript
import { chromium } from "playwright";
|
|
const args = ["--host-resolver-rules=MAP canvas.flow-master.ai 65.21.71.186", "--ignore-certificate-errors"];
|
|
const b = await chromium.launch({ headless: true, args });
|
|
const p = await (await b.newContext({ viewport: { width: 1440, height: 900 } })).newPage();
|
|
await p.goto("https://canvas.flow-master.ai/", { waitUntil: "networkidle" });
|
|
await p.waitForTimeout(800);
|
|
await p.locator(".persona-chip", { hasText: /Mariana/ }).click();
|
|
await p.locator(".dev-login-btn").click();
|
|
await p.waitForSelector(".hero-actions", { timeout: 15000 });
|
|
await p.waitForFunction(() => document.querySelectorAll(".hub-chip").length >= 8, undefined, { timeout: 15000 }).catch(() => {});
|
|
await p.locator(".hub-chip", { hasText: /Procurement Hub/ }).click();
|
|
await p.waitForTimeout(2000);
|
|
const tabs = await p.locator(".tab").evaluateAll((els) => els.map((e) => JSON.stringify(e.textContent)));
|
|
console.log("tabs:", tabs);
|
|
await b.close();
|