Files
cd/ui/smoke/playwright.config.ts
zeekay 332ceebc38 Gate releases on a browser smoke test of the UI
pnpm smoke drives the built bundle in Chromium against a fixture API
(ui/smoke/stub.mjs): login redirect and sign-in, the applications list,
an application's resource tree and resource panel, application sets,
every settings list and detail page, and the sidebar. Any page error,
console error or unanswered /v1 call fails it. Against v3.7.3's source
all eight tests fail on the withRouter error cd.hanzo.ai shows.

hanzo.yml runs it as the ui-smoke gate, so a UI that dies at load
publishes no image.
2026-10-09 10:58:11 -07:00

16 lines
562 B
TypeScript

import {defineConfig} from '@playwright/test';
// The built UI (dist/app) against smoke/stub.mjs, which answers /v1 from fixtures.
const port = 4173;
export default defineConfig({
testDir: '.',
testMatch: 'smoke.ts',
timeout: 60_000,
retries: 0,
workers: 1,
reporter: 'list',
use: {baseURL: `http://127.0.0.1:${port}`, browserName: 'chromium', trace: 'retain-on-failure'},
webServer: {command: `node stub.mjs ${port}`, url: `http://127.0.0.1:${port}/v1/settings`, reuseExistingServer: false, stdout: 'pipe', stderr: 'pipe'}
});