Organize test logs into separate directories by test suite and file
- wxWidgets logs: tests/logs/wxwidgets/<test-file>/ - KiCad logs: tests/logs/kicad/<test-file>/ - Global setup now cleans all log subdirectories recursively - Added globalSetup to KiCad playwright config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
2ad6786198
commit
eedfe22654
6 changed files with 88 additions and 31 deletions
|
|
@ -1,10 +1,14 @@
|
|||
import { test, expect } from '@playwright/test';
|
||||
import { test, expect } from './fixtures';
|
||||
|
||||
/**
|
||||
* PCBnew WASM E2E Tests
|
||||
*
|
||||
* These tests verify that the KiCad PCBnew application runs correctly in the browser.
|
||||
* The WASM files are served from apps/kicad/ via the web server.
|
||||
*
|
||||
* Logs are written to tests/logs/:
|
||||
* - {test-name}.log - console output
|
||||
* - {test-name}.errors.log - page errors (if any)
|
||||
*/
|
||||
|
||||
test.describe('PCBnew WASM', () => {
|
||||
|
|
@ -13,21 +17,22 @@ test.describe('PCBnew WASM', () => {
|
|||
await page.goto('/kicad/pcbnew.html');
|
||||
});
|
||||
|
||||
test('should load PCBnew WASM module', async ({ page }) => {
|
||||
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 });
|
||||
|
||||
// testLogger automatically captures all console output and errors
|
||||
});
|
||||
|
||||
test('should render without JavaScript errors', async ({ page }) => {
|
||||
const errors: string[] = [];
|
||||
page.on('pageerror', err => errors.push(err.message));
|
||||
|
||||
test('should render without JavaScript errors', async ({ page, testLogger }) => {
|
||||
await page.goto('/kicad/pcbnew.html');
|
||||
await page.waitForTimeout(5000); // Give time for WASM to load
|
||||
|
||||
// Filter out known acceptable errors if any
|
||||
const criticalErrors = errors.filter(e => !e.includes('ResizeObserver'));
|
||||
// Check captured errors (excluding known acceptable ones)
|
||||
const criticalErrors = testLogger.errors.filter(e =>
|
||||
!e.includes('ResizeObserver') && !e.includes('favicon')
|
||||
);
|
||||
expect(criticalErrors).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue