test(ui): verify storybook light theme

This commit is contained in:
vince 2026-06-20 01:07:26 +02:00
parent b923ac8947
commit 0b2deb8405
4 changed files with 83 additions and 10 deletions

View file

@ -2,6 +2,8 @@ import { defineConfig, devices } from "@playwright/test";
const port = Number(process.env.PLAYWRIGHT_PORT || 4173);
const baseURL = `http://127.0.0.1:${port}`;
const storybookPort = Number(process.env.PLAYWRIGHT_STORYBOOK_PORT || 6007);
const storybookURL = `http://127.0.0.1:${storybookPort}`;
const databaseUrl =
process.env.PLAYWRIGHT_DATABASE_URL ||
`file:./data/playwright-${process.pid}-${Date.now()}.sqlite`;
@ -17,12 +19,20 @@ export default defineConfig({
trace: "retain-on-failure",
screenshot: "only-on-failure",
},
webServer: {
command: `DISABLE_LIVE_DATASOURCES=1 bun run build && DISABLE_LIVE_DATASOURCES=1 DATABASE_URL=${databaseUrl} HOST=127.0.0.1 PORT=${port} bun build/index.js`,
url: baseURL,
reuseExistingServer: false,
timeout: 120_000,
},
webServer: [
{
command: `DISABLE_LIVE_DATASOURCES=1 bun run build && DISABLE_LIVE_DATASOURCES=1 DATABASE_URL=${databaseUrl} HOST=127.0.0.1 PORT=${port} bun build/index.js`,
url: baseURL,
reuseExistingServer: false,
timeout: 120_000,
},
{
command: `[ -f storybook-static/iframe.html ] || bun run build-storybook; STORYBOOK_STATIC_PORT=${storybookPort} bun tests/e2e/storybook-server.ts`,
url: storybookURL,
reuseExistingServer: false,
timeout: 120_000,
},
],
projects: [
{
name: "chromium-desktop",