Files
app/frontend/scripts/verify-live.mjs
T
stroblmeandClaude Fable 5 42075a6dae Give a connector node an icon that is not a code icon
A device read over a proprietary protocol was showing the fallback used
for a function node. A connector's type cannot be in the built-in icon
map — that is the point of it being a connector — so they share a plug.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011LF61rxW1FG5YCD2J9YqjY
2026-08-16 11:14:35 +02:00

42 lines
1.5 KiB
JavaScript

/** Screenshot the dashboard and the flow canvas as a user will find them. */
import { mkdir } from "node:fs/promises"
import { chromium } from "@playwright/test"
const APP_URL = process.env.APP_URL || "http://app.localhost"
const OUT = process.env.SCREENSHOT_DIR || "screenshots"
const browser = await chromium.launch()
for (const theme of ["light", "dark"]) {
const dir = `${OUT}/${theme}`
await mkdir(dir, { recursive: true })
const context = await browser.newContext({
viewport: { width: 1440, height: 900 },
colorScheme: theme,
})
await context.addInitScript((t) => {
localStorage.setItem("fluksio-ui-theme", t)
}, theme)
const page = await context.newPage()
await page.goto(`${APP_URL}/login`, { waitUntil: "networkidle" })
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_URL}/`, { timeout: 15000 })
await page.goto(`${APP_URL}/dashboards/aircon`, { waitUntil: "networkidle" })
await page.waitForTimeout(2500)
await page.screenshot({ path: `${dir}/live-dashboard.png` })
await page.goto(`${APP_URL}/flows/aircon`, { waitUntil: "networkidle" })
await page.keyboard.press("Escape")
await page.waitForTimeout(2500)
await page.screenshot({ path: `${dir}/live-flow.png` })
console.log(` ${theme}: done`)
await context.close()
}
await browser.close()