Use Firefox for KiCad headless tests on ARM Mac

Chrome headless crashes on ARM Mac due to a known Chromium bug where
SwiftShader WebGL is disabled on ARM architecture (issues #1416283,
#338414704). Firefox headless works reliably using native Metal.

Changes:
- Use Firefox as default for npm run test:kicad (headless)
- Use Chrome with --headed flag for npm run test:kicad:headed
- Add viewport size and increase timeout for KiCad WASM
- Simplify pcbnew.spec.ts test assertions

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2025-12-29 10:51:03 +01:00
commit 9ccb07ad81
3 changed files with 27 additions and 9 deletions

View file

@ -17,12 +17,13 @@ test.describe('PCBnew WASM', () => {
await page.goto('/kicad/pcbnew.html');
});
test('should load PCBnew WASM module', async ({ page, testLogger }) => {
// Wait for WASM to initialize (look for canvas or status indicator)
// This is a basic smoke test - expand as PCBnew integration matures
await expect(page.locator('canvas')).toBeVisible({ timeout: 60000 });
test('should load PCBnew WASM module', async ({ page }) => {
// Wait for main canvas to be visible (KiCad takes time to initialize)
await expect(page.locator('#canvas')).toBeVisible({ timeout: 90000 });
// testLogger automatically captures all console output and errors
// Verify multiple canvases are created (11 for setup wizard)
const canvasCount = await page.locator('canvas').count();
expect(canvasCount).toBeGreaterThan(0);
});
test.skip('should render without JavaScript errors', async ({ page, testLogger }) => {