import { chromium } from "@playwright/test" const APP = "http://app.localhost" const OUT = "/tmp/claude-1000/-home-lc3267-Documents-CodeWorkspace-fluksio/8b6d42d6-2889-4321-ac59-4e6692fcfe3c/scratchpad" const browser = await chromium.launch() const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } }) const page = await ctx.newPage() page.on("pageerror", (e) => console.log(`[pageerror] ${e.message}`)) await page.goto(`${APP}/login`) await page.getByTestId("email-input").fill(process.env.FIRST_SUPERUSER) await page.getByTestId("password-input").fill(process.env.FIRST_SUPERUSER_PASSWORD) await page.getByRole("button", { name: /log in/i }).click() await page.waitForURL(`${APP}/`) console.log("sidebar items entry:", await page.getByRole("link", { name: "Items" }).count()) await page.goto(`${APP}/flows/heating`) await page.waitForSelector(".react-flow__node") await page.waitForTimeout(1200) // A node that consumes: its Consumes list should suggest what others publish. await page.locator(".react-flow__node").filter({ hasText: "Notify" }).first().click() const panel = page.getByTestId("node-panel") await panel.getByRole("button", { name: "Add" }).first().click() await page.waitForTimeout(600) console.log("focused after Add:", await page.evaluate(() => document.activeElement?.getAttribute("aria-label"))) const options = await page.getByRole("option").allInnerTexts() console.log("suggestions offered:", options) await page.screenshot({ path: `${OUT}/suggestions.png` }) await browser.close()