trips) add playwright e2e flows and issue video upload guidance
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m27s
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m27s
This commit is contained in:
53
playwright.config.ts
Normal file
53
playwright.config.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
import { config as dotenvConfig } from 'dotenv';
|
||||
import { resolve } from 'path';
|
||||
|
||||
// Load .env.test so both this process and the webServer child process see the values.
|
||||
dotenvConfig({ path: resolve(process.cwd(), '.env.test'), override: true });
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e',
|
||||
fullyParallel: false,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 1 : 0,
|
||||
workers: 1,
|
||||
reporter: 'html',
|
||||
|
||||
use: {
|
||||
baseURL: 'http://127.0.0.1:5173',
|
||||
trace: process.env.PW_TRACE_MODE ?? 'on-first-retry',
|
||||
video: process.env.PW_VIDEO_MODE ?? 'off'
|
||||
},
|
||||
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] }
|
||||
}
|
||||
],
|
||||
|
||||
globalTeardown: './e2e/setup/global-teardown.ts',
|
||||
|
||||
webServer: {
|
||||
// Playwright starts webServer before globalSetup. Seed first so the app
|
||||
// process opens the final DB file and never sees it replaced underneath.
|
||||
command: 'bun run e2e/setup/seed-db.ts && bunx --bun vite dev --host 127.0.0.1',
|
||||
url: 'http://127.0.0.1:5173/trips',
|
||||
// Always start a fresh server to ensure it uses trips.test.db
|
||||
reuseExistingServer: false,
|
||||
timeout: 120_000,
|
||||
env: {
|
||||
AUTH_URL: process.env.AUTH_URL!,
|
||||
AUTH_SECRET: process.env.AUTH_SECRET!,
|
||||
LOCAL_AUTH_ENABLED: process.env.LOCAL_AUTH_ENABLED!,
|
||||
LOCAL_AUTH_ARGON2_MEMORY_KB: process.env.LOCAL_AUTH_ARGON2_MEMORY_KB!,
|
||||
LOCAL_AUTH_ARGON2_TIME_COST: process.env.LOCAL_AUTH_ARGON2_TIME_COST!,
|
||||
LOCAL_AUTH_ARGON2_PARALLELISM: process.env.LOCAL_AUTH_ARGON2_PARALLELISM!,
|
||||
ADMIN_USER_IDS: process.env.ADMIN_USER_IDS!,
|
||||
DATABASE_URL: process.env.DATABASE_URL!,
|
||||
SYNOLOGY_ISSUER: process.env.SYNOLOGY_ISSUER!,
|
||||
SYNOLOGY_CLIENT_ID: process.env.SYNOLOGY_CLIENT_ID!,
|
||||
SYNOLOGY_CLIENT_SECRET: process.env.SYNOLOGY_CLIENT_SECRET!
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user