Files
faunosteo/apps/app/e2e/playwright.shell.config.ts
T
bchanot db81928dfa fix(app): no HTML report for the shell suite, it kept typed passwords
The report's step titles held what the tests typed, the throwaway sandbox
accounts' passwords included, contrary to BROWSER_TESTS.md. The shell suite
keeps the terminal output and failure screenshots; the old report deleted.
2026-10-26 02:00:33 +01:00

50 lines
1.6 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 and no HTML report are kept: they would hold the
* session tokens and the typed passwords.
*/
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,
// No HTML report: its step titles would keep what the test typed, the
// fictitious accounts' passwords included. The terminal and the failure
// screenshots stay.
reporter: [['list']],
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,
},
},
})