Files
faunosteo/apps/app/e2e/playwright.shell.config.ts
T
bchanot e3a2b3e114 test(app): authenticated shell suite on the isolated stack
pnpm e2e:shell (db-sandbox e2e-shell) builds a Vite server on 127.0.0.1:5192 against a Supabase URL that resolves nowhere and replays its calls on the sandbox. Per-test fictitious accounts through the admin API, a clean avatar seeded: sign-in, dashboard, the photo confirmation with a slow removal, the phone drawer, FR and EN, axe. No trace kept, fixture values masked in reports.
2026-10-25 22:46:19 +01:00

49 lines
1.5 KiB
TypeScript

/**
* `pnpm e2e:shell` (scripts/db-sandbox.sh e2e-shell): the authenticated /app
* shell in Chromium against the isolated stack of `pnpm db:sandbox`, never DEV.
* The dev server is built with a Supabase URL that resolves nowhere and runs
* on a loopback port of its own; e2e/support/sandbox.ts replays its calls on
* the sandbox. No trace is kept: it would hold the session tokens.
*/
import { defineConfig } from '@playwright/test'
import type { GuardOptions } from './support/browser'
import { PROJECTS } from './support/browser'
const ORIGIN = 'http://127.0.0.1:5192'
const FAKE_SUPABASE_ORIGIN = 'http://sandbox.faunosteo.invalid'
const anonKey = process.env.SANDBOX_ANON_KEY
if (!anonKey)
throw new Error(
'SANDBOX_ANON_KEY missing: run pnpm e2e:shell (the sandbox must be up)',
)
export default defineConfig<GuardOptions>({
testDir: './shell',
outputDir: './test-results/shell',
fullyParallel: true,
forbidOnly: true,
retries: 0,
reporter: [
['list'],
['html', { outputFolder: './playwright-report/shell', open: 'never' }],
],
use: {
baseURL: ORIGIN,
allowedOrigins: [ORIGIN, FAKE_SUPABASE_ORIGIN],
trace: 'off',
screenshot: 'only-on-failure',
},
projects: PROJECTS,
webServer: {
command: 'node_modules/.bin/vite --host 127.0.0.1 --port 5192 --strictPort',
cwd: '..',
url: `${ORIGIN}/`,
reuseExistingServer: false,
timeout: 120_000,
env: {
VITE_SUPABASE_URL: FAKE_SUPABASE_ORIGIN,
VITE_SUPABASE_ANON_KEY: anonKey,
},
},
})