Set up Playwright with Chromium, dev server auto-start, test helpers for seeding bots and programmatic auth. Added smoke spec that verifies homepage and leaderboard load without crashes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
621 B
TypeScript
32 lines
621 B
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
export default defineConfig({
|
|
testDir: '.',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: 'html',
|
|
timeout: 30_000,
|
|
|
|
use: {
|
|
baseURL: 'http://localhost:5173',
|
|
trace: 'on-first-retry',
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
|
|
webServer: {
|
|
command: 'pnpm dev',
|
|
url: 'http://localhost:5173',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 30_000,
|
|
cwd: '..',
|
|
},
|
|
})
|