Add Playwright end-to-end tests
Two devices (EN + CS) sharing a group through sync, photos, rates, rewind, offline and settle-up; plus push delivery to the service worker via CDP. Can target a running deployment with E2E_BASE_URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FYo6JSV1fDU1fm3LU77iF
This commit is contained in:
parent
8fbbb4933e
commit
a78d855886
3 changed files with 221 additions and 0 deletions
27
playwright.config.ts
Normal file
27
playwright.config.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
// E2E against the production build served by the real server.
|
||||
// Run `npm run build` first. Uses a throwaway data dir per run.
|
||||
// Set E2E_BASE_URL to test an already running deployment instead (e.g. the
|
||||
// compose stack: E2E_BASE_URL=https://localhost:8483).
|
||||
const external = process.env.E2E_BASE_URL;
|
||||
const port = 8490;
|
||||
const dataDir = `${process.env.TMPDIR ?? '/tmp'}/oweme-e2e-${Date.now()}`;
|
||||
|
||||
export default defineConfig({
|
||||
testDir: 'e2e',
|
||||
timeout: 90_000,
|
||||
fullyParallel: false,
|
||||
workers: 1,
|
||||
reporter: [['list']],
|
||||
use: { baseURL: external ?? `http://127.0.0.1:${port}`, ignoreHTTPSErrors: !!external, trace: 'retain-on-failure' },
|
||||
projects: [
|
||||
{ name: 'mobile-chromium', use: { ...devices['Pixel 7'] } },
|
||||
],
|
||||
webServer: external ? undefined : {
|
||||
command: 'node --disable-warning=ExperimentalWarning apps/server/src/main.ts',
|
||||
url: `http://127.0.0.1:${port}/api/health`,
|
||||
reuseExistingServer: false,
|
||||
env: { PORT: String(port), DATA_DIR: dataDir, STATIC_DIR: 'apps/web/dist', GROUP_CREATE_PER_HOUR: '100' },
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue