Rewrite the Playwright suite to mock the platform-service at the Next.js proxy boundary (/api/tracker, /api/auth) so no live backend is required, and provide the env vars /api/health needs via webServer.env. Adds a login->dashboard happy path, board/list toggle and vote-prompt coverage, axe-core accessibility assertions (resolved from the workspace, no new dependency), and a no-unexpected-console-errors check. The axe gate surfaced a real bug: the roadmap type-filter and submit-modal <select> elements had no accessible name. Fixed by adding aria-labels. Also ignore coverage/test-results/playwright-report in eslint. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
34 lines
925 B
TypeScript
34 lines
925 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: process.env.CI ? 1 : undefined,
|
|
reporter: 'html',
|
|
use: {
|
|
baseURL: 'http://localhost:3003',
|
|
trace: 'on-first-retry',
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: 'npm run dev',
|
|
url: 'http://localhost:3003',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 30_000,
|
|
// Provide the env vars /api/health requires so the health gate is deterministic.
|
|
// These are non-secret placeholders only used to exercise the health handler.
|
|
env: {
|
|
PLATFORM_API_URL: 'http://localhost:4003',
|
|
JWT_SECRET: 'e2e-placeholder-not-a-real-secret',
|
|
DEFAULT_PRODUCT_ID: 'tracker-e2e',
|
|
},
|
|
},
|
|
});
|