pcbjam/tests/playwright.config.ts
Viktor Vaczi 756feb35da Add WASM feature tests: font enum, text decor, bitmap mask, regions
New test apps and E2E tests:
- fontenum: Font enumeration via Local Font Access API (180 fonts)
- textdecor: Text underline/strikethrough decorations
- bitmask: wxMask bitmap transparency with color keys
- regions: Non-rectangular region clipping (union, subtract, complex shapes)

Updates:
- playwright.config.ts: Add local-fonts permission
- WHATWORKS.md: Document implemented features, update test counts
- Makefile.wasm: Add build targets for new test apps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 11:06:33 +01:00

34 lines
868 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',
timeout: 60000, // WASM can be slow to load
// Exclude button-finder from regular test runs - it's a utility, not a test
testIgnore: ['**/button-finder.spec.ts'],
use: {
baseURL: 'http://localhost:8080',
trace: 'on-first-retry',
// Grant clipboard and font permissions for tests
permissions: ['clipboard-read', 'clipboard-write', 'local-fonts'],
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'npx serve wasm-app -p 8080',
port: 8080,
reuseExistingServer: !process.env.CI,
},
});