The sandbox suites (stack.ts and its importers, the shell Playwright config) stop before their first request unless the container, the four loopback URLs and the key issuer are exactly the db:sandbox ones; the LAN config accepts the 5193 trial app only. Drift and wiring tests tie the constants to scripts/db-sandbox.sh.
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
/**
|
|
* `playwright test -c e2e/playwright.lan.config.ts` (docs/development/V1-2-6_OWNER_TRIAL.md):
|
|
* the owner's trial reached through its LAN origin, which is a non-secure context like a
|
|
* phone's browser. It needs a running `pnpm db:sandbox trial` and a trial account; the
|
|
* page may reach that origin only. No trace, no report: they would hold the session tokens
|
|
* and the password. Run by hand, never part of check:all.
|
|
*/
|
|
import { defineConfig } from '@playwright/test'
|
|
import type { GuardOptions } from './support/browser'
|
|
|
|
const ORIGIN = process.env.TRIAL_ORIGIN ?? 'http://192.168.1.100:5193'
|
|
// Port check only: 5193 is the app of pnpm db:sandbox trial; the db:trial app (5194) is never
|
|
// a test target.
|
|
if (new URL(ORIGIN).port !== '5193')
|
|
throw new Error(
|
|
'Refused: TRIAL_ORIGIN must be the app of pnpm db:sandbox trial (port 5193)',
|
|
)
|
|
|
|
export default defineConfig<GuardOptions>({
|
|
testDir: './lan',
|
|
outputDir: './test-results/lan',
|
|
forbidOnly: true,
|
|
retries: 0,
|
|
expect: { timeout: 15_000 },
|
|
reporter: [['list']],
|
|
use: {
|
|
baseURL: ORIGIN,
|
|
locale: 'fr-FR',
|
|
allowedOrigins: [ORIGIN],
|
|
trace: 'off',
|
|
screenshot: 'off',
|
|
viewport: { width: 1280, height: 900 },
|
|
},
|
|
})
|