Files
canvas-bot 5abb3595fc
build-and-publish / test (push) Has been cancelled
build-and-publish / image (push) Has been cancelled
fix(wizard): retry createDraft on 500/502/503/504 + human error message
POST /api/ea2/flow currently returns 500 after 19s on demo upstream.
Retry once with backoff, then surface a clear 'EA2 backend temporarily
unable to create new processes' message naming the status. The user
gets actionable info instead of a raw 500.
2026-06-15 19:42:32 +04:00

28 lines
1.3 KiB
JavaScript

// Just Studio
import { chromium } from "playwright";
const b = await chromium.launch({ headless: true });
const ctx = await b.newContext({ viewport: { width: 1440, height: 900 } });
const p = await ctx.newPage();
const calls = [];
p.on("response", (r) => { if (r.url().includes("/api/")) calls.push({ status: r.status(), method: r.request().method(), url: r.url().replace("https://canvas.flow-master.ai", "") }); });
await ctx.addInitScript(() => localStorage.setItem("fm.canvas.tour.seen", String(Date.now())));
await p.goto("https://canvas.flow-master.ai/", { waitUntil: "domcontentloaded" });
await p.waitForTimeout(2500);
await p.locator(".persona-chip").filter({ hasText: /Mariana/ }).click();
await p.waitForSelector(".topbar", { timeout: 30000 });
await p.waitForTimeout(2000);
console.log("on mission");
await p.locator(".tab").filter({ hasText: /Studio/i }).first().click();
await p.waitForTimeout(3000);
const sceneText1 = await p.evaluate(() => document.querySelector(".scene")?.innerText?.slice(0, 600) || "?");
console.log("Studio scene:", sceneText1);
const buttons = await p.locator("button").allTextContents();
console.log("buttons:", buttons.map(b => b.trim()).filter(Boolean).slice(0, 20));
await p.screenshot({ path: "/tmp/canvas-evidence/studio-state.png" });
await b.close();