test: add Playwright e2e smoke suite for punimtag dev
Add an e2e/ Playwright harness (via @levkin/playkit) that smoke-tests the public DEV host: login page loads, sign-out never redirects to a LAN host, FastAPI /health responds, and forgot-password mail lands in Mailtrap with a public reset link (Kolby #56/#57 regressions). Wire it into Gitea Actions as a new `e2e` job (self-hosted runner, Chromium via Playwright), gated behind the existing skip-ci-check. Add npm root scripts (install:e2e, test:e2e) and gitignore e2e build artifacts (node_modules, reports, .env).
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
const baseURL =
|
||||
process.env.PLAYKIT_BASE_URL ||
|
||||
process.env.BASE_URL ||
|
||||
'https://punimtagdev.levkin.ca';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './tests',
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 1 : 0,
|
||||
workers: process.env.CI ? 2 : undefined,
|
||||
reporter: process.env.CI
|
||||
? [['list'], ['html', { open: 'never' }], ['junit', { outputFile: 'test-results/junit.xml' }]]
|
||||
: [['list'], ['html', { open: 'on-failure' }]],
|
||||
timeout: 60_000,
|
||||
expect: { timeout: 15_000 },
|
||||
use: {
|
||||
baseURL,
|
||||
trace: 'retain-on-failure',
|
||||
screenshot: 'only-on-failure',
|
||||
video: 'retain-on-failure',
|
||||
...devices['Desktop Chrome'],
|
||||
},
|
||||
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
|
||||
});
|
||||
Reference in New Issue
Block a user