Fourteen commits since v0.13.0. See CHANGELOG.md for the full list. Two additions: `npm run doctor`, which runs the config doctor from a terminal — including inside the shipped image — and exits with the worst finding, so it can gate a deployment script; and a Playwright spec that loads all fourteen admin routes against a production build. One change, invisible on screen: the admin panel got a form-field layer (#533). Five fixes: grid.gap on both axes (#513), the dashboard status badge (#539), the journal editor's unsaved-changes guard (#538), essay paragraph markup (#537), and aria-pressed on the panel's switches and pickers.
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
// Overridable so a run can sidestep a dev server or container already holding
|
|
// the default port; CI leaves it alone.
|
|
const PORT = process.env.E2E_PORT || '3000';
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: 'html',
|
|
use: {
|
|
baseURL: `http://localhost:${PORT}`,
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
webServer: {
|
|
// The admin smoke test (e2e/admin-smoke.spec.ts) exists to catch bugs that
|
|
// only surface in a real browser against a real build — #542 was invisible
|
|
// to the dev server's on-demand compilation path. E2E_START=1 points the
|
|
// suite at `npm run start` so CI exercises the same output that ships.
|
|
command:
|
|
process.env.E2E_START === '1' ? `npm run start -- -p ${PORT}` : `npm run dev -- -p ${PORT}`,
|
|
url: `http://localhost:${PORT}`,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 60_000,
|
|
env: {
|
|
// Without this the admin panel reports itself disabled and the smoke
|
|
// test skips. A local run that already exports ADMIN_PASSWORD keeps it.
|
|
ADMIN_PASSWORD: process.env.ADMIN_PASSWORD || 'e2e-admin-password',
|
|
},
|
|
},
|
|
});
|