test(pl_editor): commit screenshot baseline + fix dialog screenshot timing

Adds a 600ms wait between the wxFileDialog appearing in the registry and
the screenshot in tests/kicad/pl_editor.spec.ts. Without it, the dialog
object exists but its MEMFS readdir (asyncified) hasn't returned yet, so
the screenshot caught a half-painted black rectangle — fine for the
registry-based assertion but useless as a pixel baseline.

Commits the 10 pl_editor screenshots produced by the spec as the baseline
reference under tests/baseline-screenshots/.

Bumps the wxwidgets submodule pointer to pick up the expanded comment on
the wxGenericFileDialog::OnOk fix (explains why the patch lives in the
generic dialog instead of src/wasm/ — OnOk is the join point for both the
OK button and <Enter> via the dialog's compile-time event table, so
subclassing in wasm/ wouldn't intercept either).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Balint Ipkovich 2026-06-01 13:50:40 +02:00
commit 8fd78d42b2
12 changed files with 7 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View file

@ -140,6 +140,12 @@ test.describe('pl_editor WASM', () => {
.some((el: { typeName: string }) => el.typeName === 'wxFileDialog');
}, null, { timeout: 15000 });
// The dialog object exists in the registry as soon as C++ constructs it,
// but the directory enumeration (MEMFS readdir → asyncify suspend) hasn't
// returned yet so the inner file list isn't painted. Without this wait the
// screenshot catches the dialog as a black rectangle.
await page.waitForTimeout(600);
await page.screenshot({ path: 'test-results/pl_editor-04-save-as-dialog.png', scale: 'device' });
// The bug: pressing Enter on a folder name treated it as a file and surfaced