mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-20 05:53:38 +02:00
Contacts (10 tests): - playwright.config.ts, auth fixture with storage state caching - auth.spec.ts: login page, invalid credentials, successful login, redirect - contacts.spec.ts: create, favorite, delete, search contact - tags.spec.ts: create tag, search tag Todo (10 tests): - playwright.config.ts, auth fixture with storage state caching - auth.spec.ts: login page, invalid credentials, successful login, redirect - tasks.spec.ts: create, complete/uncomplete, delete task - projects.spec.ts: create task, navigate tags, create/delete tag Both follow Calendar's E2E pattern: custom auth fixtures, backend health checks, German UI text, unique test data with Date.now() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
39 lines
1,014 B
TypeScript
39 lines
1,014 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: 1,
|
|
reporter: process.env.CI ? [['github'], ['html', { open: 'never' }]] : [['html']],
|
|
|
|
use: {
|
|
baseURL: 'http://localhost:5188',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure',
|
|
actionTimeout: 10000,
|
|
navigationTimeout: 30000,
|
|
},
|
|
|
|
timeout: 60000,
|
|
expect: { timeout: 5000 },
|
|
|
|
projects: process.env.CI
|
|
? [
|
|
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
|
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
|
|
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
|
|
]
|
|
: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
|
|
|
|
webServer: {
|
|
command: 'pnpm run build && pnpm run preview --port 5188',
|
|
port: 5188,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120000,
|
|
},
|
|
|
|
outputDir: 'test-results/',
|
|
});
|