2025-12-27 16:35:40 +01:00
|
|
|
import { test, expect } from './fixtures';
|
2026-01-19 14:32:33 +01:00
|
|
|
import { clickByLabel } from '../e2e/utils/element-tracker';
|
Add KiCad WASM build infrastructure and dependency scripts
- Add build environment setup (scripts/common/env.sh, versions.sh, functions.sh)
- Add dependency build scripts for Zstd, GLM, FreeType, HarfBuzz, Pixman, Cairo
- Add placeholder scripts for OpenCASCADE, ngspice, protobuf
- Add WASM compatibility layer (wasm/kiplatform/, wasm/libcontext/)
- Add CMake modules for KiCad WASM cross-compilation
- Add PCBnew test infrastructure (tests/kicad/)
- Add build plan documentation
Successfully tested builds: Zstd 1.5.5, GLM 0.9.9.8, FreeType 2.13.2,
HarfBuzz 8.3.0, Pixman 0.42.2, Cairo 1.18.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:15:04 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* PCBnew WASM E2E Tests
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
test.describe('PCBnew WASM', () => {
|
|
|
|
|
test.beforeEach(async ({ page }) => {
|
2025-12-27 16:01:35 +01:00
|
|
|
await page.goto('/kicad/pcbnew.html');
|
Add KiCad WASM build infrastructure and dependency scripts
- Add build environment setup (scripts/common/env.sh, versions.sh, functions.sh)
- Add dependency build scripts for Zstd, GLM, FreeType, HarfBuzz, Pixman, Cairo
- Add placeholder scripts for OpenCASCADE, ngspice, protobuf
- Add WASM compatibility layer (wasm/kiplatform/, wasm/libcontext/)
- Add CMake modules for KiCad WASM cross-compilation
- Add PCBnew test infrastructure (tests/kicad/)
- Add build plan documentation
Successfully tested builds: Zstd 1.5.5, GLM 0.9.9.8, FreeType 2.13.2,
HarfBuzz 8.3.0, Pixman 0.42.2, Cairo 1.18.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:15:04 +01:00
|
|
|
});
|
|
|
|
|
|
2026-01-12 15:17:03 +01:00
|
|
|
test('click through setup wizard to load PCBnew', async ({ page, testLogger }) => {
|
2025-12-29 10:51:03 +01:00
|
|
|
// Wait for main canvas to be visible (KiCad takes time to initialize)
|
|
|
|
|
await expect(page.locator('#canvas')).toBeVisible({ timeout: 90000 });
|
2026-01-12 15:17:03 +01:00
|
|
|
await page.waitForTimeout(2000);
|
Add KiCad WASM build infrastructure and dependency scripts
- Add build environment setup (scripts/common/env.sh, versions.sh, functions.sh)
- Add dependency build scripts for Zstd, GLM, FreeType, HarfBuzz, Pixman, Cairo
- Add placeholder scripts for OpenCASCADE, ngspice, protobuf
- Add WASM compatibility layer (wasm/kiplatform/, wasm/libcontext/)
- Add CMake modules for KiCad WASM cross-compilation
- Add PCBnew test infrastructure (tests/kicad/)
- Add build plan documentation
Successfully tested builds: Zstd 1.5.5, GLM 0.9.9.8, FreeType 2.13.2,
HarfBuzz 8.3.0, Pixman 0.42.2, Cairo 1.18.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:15:04 +01:00
|
|
|
|
2026-01-12 15:17:03 +01:00
|
|
|
// Screenshot initial wizard state
|
|
|
|
|
await page.screenshot({ path: 'test-results/wizard-00-initial.png' });
|
Add KiCad WASM build infrastructure and dependency scripts
- Add build environment setup (scripts/common/env.sh, versions.sh, functions.sh)
- Add dependency build scripts for Zstd, GLM, FreeType, HarfBuzz, Pixman, Cairo
- Add placeholder scripts for OpenCASCADE, ngspice, protobuf
- Add WASM compatibility layer (wasm/kiplatform/, wasm/libcontext/)
- Add CMake modules for KiCad WASM cross-compilation
- Add PCBnew test infrastructure (tests/kicad/)
- Add build plan documentation
Successfully tested builds: Zstd 1.5.5, GLM 0.9.9.8, FreeType 2.13.2,
HarfBuzz 8.3.0, Pixman 0.42.2, Cairo 1.18.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:15:04 +01:00
|
|
|
|
2026-01-12 15:17:03 +01:00
|
|
|
// Click through wizard - try Next >, then Finish if not found
|
|
|
|
|
for (let i = 1; i <= 10; i++) {
|
|
|
|
|
let clicked = await clickByLabel(page, 'Next >');
|
|
|
|
|
if (clicked) {
|
2026-01-19 14:32:33 +01:00
|
|
|
// Continue to next page
|
2026-01-12 15:17:03 +01:00
|
|
|
} else {
|
|
|
|
|
// Try Finish button
|
|
|
|
|
clicked = await clickByLabel(page, 'Finish');
|
|
|
|
|
if (clicked) {
|
|
|
|
|
await page.waitForTimeout(500);
|
|
|
|
|
await page.screenshot({ path: `test-results/wizard-${String(i).padStart(2, '0')}-finish.png` });
|
|
|
|
|
break;
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
await page.waitForTimeout(500);
|
|
|
|
|
await page.screenshot({ path: `test-results/wizard-${String(i).padStart(2, '0')}.png` });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Wait for PCBnew to fully load
|
|
|
|
|
await page.waitForTimeout(2000);
|
|
|
|
|
await page.screenshot({ path: 'test-results/pcbnew-loaded.png' });
|
|
|
|
|
|
|
|
|
|
// Verify PCBnew loaded
|
|
|
|
|
const canvasCount = await page.locator('canvas').count();
|
|
|
|
|
expect(canvasCount).toBeGreaterThan(0);
|
Add KiCad WASM build infrastructure and dependency scripts
- Add build environment setup (scripts/common/env.sh, versions.sh, functions.sh)
- Add dependency build scripts for Zstd, GLM, FreeType, HarfBuzz, Pixman, Cairo
- Add placeholder scripts for OpenCASCADE, ngspice, protobuf
- Add WASM compatibility layer (wasm/kiplatform/, wasm/libcontext/)
- Add CMake modules for KiCad WASM cross-compilation
- Add PCBnew test infrastructure (tests/kicad/)
- Add build plan documentation
Successfully tested builds: Zstd 1.5.5, GLM 0.9.9.8, FreeType 2.13.2,
HarfBuzz 8.3.0, Pixman 0.42.2, Cairo 1.18.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:15:04 +01:00
|
|
|
});
|
|
|
|
|
});
|