refactor: collapse dual-mode plumbing — the DOM port is the only WASM build
The canvas (wxUniversal) mode is gone (wxwidgets submodule); remove every piece of side-by-side plumbing so there is exactly one build and one test flow: - scripts/build-wxuniversal-wasm.sh -> scripts/build-wx-wasm.sh; no --dom/--enable-universal; builds into build-wasm/wxwidgets - build-wasm-test.sh: no DOM_BUILD / apps-dom rsync mirror / PORT=dom; apps build straight into tests/apps (Makefile.wasm PORT conditionals collapsed; wx.js + wx-dom.js always pre-js) - docker/build.sh, build-kicad-target.sh, env.sh: WX_PORT / -dom / -universal suffixes removed; kicad builds to kicad-<app>, outputs to output/; wx.js/wx-dom.js copied from the real source path (/workspace/wxwidgets/build/wasm — the old build-wasm path never existed and silently failed) - setup-kicad-wasm.sh: single target dir; the perl wx-dom.js injection is gone — the 7 checked-in kicad pages now reference wx-dom.js directly - playwright configs serve apps/; fixtures drop the test-results/dom and logs/wxwidgets/dom namespacing; boot.spec asserts wxDomPort unconditionally; pcbnew.spec uses one reference image; appearance.spec assertions unconditional - compare/update-baseline-screenshots.sh: --port removed - tests/gal-regression/wasm/Makefile: links build-wasm/wxwidgets and carries wx-dom.js as a second pre-js — the gal-webgl suite (30 specs) now actually builds and runs here (it needed host-side boost+glm via scripts/deps; the bundle had been missing, timing the whole spec out) - tests: clickCanvas() dispatches via page.mouse (DOM widgets legitimately cover the canvas; locator actionability refused the click); the comprehensive spec drives wxChoice through its native <select> (browser-owned popup cannot be coordinate-clicked) - docs: README/CLAUDE.md/build.md script names and dirs; features/wx-dom-port README reframed (DOM is THE port), visual-notes bugs 26-28; FindwxWidgets.cmake config label drops 'wasmuniv' - wxwidgets submodule -> 9dbacc9448 (DOM-only port, fork diff shrunk) Gate: full wx e2e suite 292 passed / 1 skipped / 0 failed — first run ever with the gal-webgl specs green (28 scenarios + load + sequential). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
2c1b0d409b
commit
7dc1bf27e0
32 changed files with 199 additions and 335 deletions
|
|
@ -107,13 +107,11 @@ test.describe('Appearance panel (Layers/Objects/Nets)', () => {
|
|||
await selectTab(page, 'Layers');
|
||||
await page.screenshot({ path: 'test-results/appearance-03-layers-again.png' });
|
||||
|
||||
// DOM port: layer rows must survive the tab round-trip (regression:
|
||||
// Layer rows must survive the tab round-trip (regression:
|
||||
// pages came back blank after switching away and back)
|
||||
if (await page.evaluate(() => !!window.wxDomPort)) {
|
||||
const tops = await rowLabelTops(page, ['F.Cu', 'B.Cu']);
|
||||
expect(tops['F.Cu'], 'F.Cu row visible after tab round-trip').not.toBeNull();
|
||||
expect(tops['B.Cu'], 'B.Cu row visible after tab round-trip').not.toBeNull();
|
||||
}
|
||||
const tops = await rowLabelTops(page, ['F.Cu', 'B.Cu']);
|
||||
expect(tops['F.Cu'], 'F.Cu row visible after tab round-trip').not.toBeNull();
|
||||
expect(tops['B.Cu'], 'B.Cu row visible after tab round-trip').not.toBeNull();
|
||||
});
|
||||
|
||||
test('layer list scrolls with the wheel and clips at the pane', async ({ page }) => {
|
||||
|
|
@ -123,37 +121,31 @@ test.describe('Appearance panel (Layers/Objects/Nets)', () => {
|
|||
const layersTab = tabs.find(t => t.label === 'Layers');
|
||||
expect(layersTab).toBeTruthy();
|
||||
|
||||
const isDom = await page.evaluate(() => !!window.wxDomPort);
|
||||
|
||||
// hover INSIDE the layer list (just below the tab strip)
|
||||
const hoverX = layersTab!.centerX;
|
||||
const hoverY = layersTab!.centerY + 120;
|
||||
await page.mouse.move(hoverX, hoverY);
|
||||
|
||||
const before = isDom ? await rowLabelTops(page, ['B.Cu', 'F.Mask']) : null;
|
||||
const before = await rowLabelTops(page, ['B.Cu', 'F.Mask']);
|
||||
|
||||
await page.mouse.wheel(0, 240);
|
||||
await page.waitForTimeout(800);
|
||||
await page.screenshot({ path: 'test-results/appearance-10-layers-scrolled.png' });
|
||||
|
||||
if (isDom && before) {
|
||||
const after = await rowLabelTops(page, ['B.Cu', 'F.Mask']);
|
||||
expect(after['B.Cu'], 'B.Cu moved up after wheel scroll')
|
||||
.toBeLessThan(before['B.Cu']!);
|
||||
expect(after['F.Mask'], 'F.Mask moved up after wheel scroll')
|
||||
.toBeLessThan(before['F.Mask']!);
|
||||
}
|
||||
const after = await rowLabelTops(page, ['B.Cu', 'F.Mask']);
|
||||
expect(after['B.Cu'], 'B.Cu moved up after wheel scroll')
|
||||
.toBeLessThan(before['B.Cu']!);
|
||||
expect(after['F.Mask'], 'F.Mask moved up after wheel scroll')
|
||||
.toBeLessThan(before['F.Mask']!);
|
||||
|
||||
// scroll back up restores the start of the list
|
||||
await page.mouse.wheel(0, -480);
|
||||
await page.waitForTimeout(800);
|
||||
await page.screenshot({ path: 'test-results/appearance-11-layers-scrolled-back.png' });
|
||||
|
||||
if (isDom && before) {
|
||||
const restored = await rowLabelTops(page, ['B.Cu']);
|
||||
expect(restored['B.Cu'], 'B.Cu back at its original position')
|
||||
.toBe(before['B.Cu']);
|
||||
}
|
||||
const restored = await rowLabelTops(page, ['B.Cu']);
|
||||
expect(restored['B.Cu'], 'B.Cu back at its original position')
|
||||
.toBe(before['B.Cu']);
|
||||
});
|
||||
|
||||
test('objects page scrolls with the wheel', async ({ page }) => {
|
||||
|
|
@ -163,17 +155,16 @@ test.describe('Appearance panel (Layers/Objects/Nets)', () => {
|
|||
|
||||
const tabs = await appearanceTabs(page);
|
||||
const objectsTab = tabs.find(t => t.label === 'Objects')!;
|
||||
const isDom = await page.evaluate(() => !!window.wxDomPort);
|
||||
|
||||
await page.mouse.move(objectsTab.centerX, objectsTab.centerY + 120);
|
||||
|
||||
const before = isDom ? await rowLabelTops(page, ['Ratsnest']) : null;
|
||||
const before = await rowLabelTops(page, ['Ratsnest']);
|
||||
|
||||
await page.mouse.wheel(0, 240);
|
||||
await page.waitForTimeout(800);
|
||||
await page.screenshot({ path: 'test-results/appearance-20-objects-scrolled.png' });
|
||||
|
||||
if (isDom && before && before['Ratsnest'] !== null) {
|
||||
if (before['Ratsnest'] !== null) {
|
||||
const after = await rowLabelTops(page, ['Ratsnest']);
|
||||
expect(after['Ratsnest'], 'Ratsnest row moved after wheel scroll')
|
||||
.toBeLessThan(before['Ratsnest']!);
|
||||
|
|
|
|||
Loading…
Reference in a new issue