findings group O: chooser Enter + infobar close fixes (wx → 15e5315244) with repro specs and uipolish guards
- tests/kicad/footprint-chooser-confirm.spec.ts (O-2): typed filter + Enter confirms the chooser and a footprint is placed. - tests/kicad/infobar-dismiss.spec.ts (O-3): real click on the older-version infobar close glyph dismisses it; GAL rect shift logged. - uipolish app/spec: rounded-neg-radius (O-1 guard), enable-propagation (O-3), dom-nav-keys Enter/ArrowDown → CHAR_HOOK with TEXT_ENTER once (O-2). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3cyLvFWbfNdCNW7x7C2A
This commit is contained in:
parent
97d4f9657e
commit
931935c70a
5 changed files with 620 additions and 1 deletions
|
|
@ -12,6 +12,8 @@
|
|||
// scaled-dims ConvertToImage returns physical size for scaled bitmaps
|
||||
// checkbox-floor wxCheckBox best-height floor (selection-filter density)
|
||||
// statbmp-best wxStaticBitmap best size is the bundle's LOGICAL size
|
||||
// rounded-neg-radius negative/oversize DrawRoundedRectangle radius paints,
|
||||
// never throws (findings O-1 — the badge that killed the wx tick)
|
||||
//
|
||||
// statbmp-best only discriminates at devicePixelRatio >= 1.5 (pre-fix the
|
||||
// FromPhys path inflated 16 -> 32 there), so a second pass runs the app at
|
||||
|
|
@ -33,6 +35,8 @@ const CHECKS = [
|
|||
'scaled-dims',
|
||||
'checkbox-floor',
|
||||
'statbmp-best',
|
||||
'rounded-neg-radius',
|
||||
'enable-propagation',
|
||||
];
|
||||
|
||||
async function waitForDone(page: Page, logs: string[]) {
|
||||
|
|
@ -70,6 +74,31 @@ test.describe('UI Polish regression guards', () => {
|
|||
await stableShot(page, 'uipolish-01-default-dpr.png', { fullPage: true });
|
||||
|
||||
assertChecks(logs);
|
||||
|
||||
// dom-nav-keys (findings O-2): keydown Enter / ArrowDown on the DOM
|
||||
// <input> must surface as wxEVT_CHAR_HOOK (13 = WXK_RETURN, 317 =
|
||||
// WXK_DOWN); the Skip()ing hook lets wxEVT_TEXT_ENTER fire exactly once.
|
||||
const domIdLine = logs.find((l) => l.includes('navkeys domId='));
|
||||
expect(domIdLine, 'navkeys text ctrl announced its DOM id').toBeDefined();
|
||||
const domId = Number(domIdLine!.split('domId=')[1]);
|
||||
const fired = await page.evaluate((id) => {
|
||||
const el = document.querySelector(`[data-wx-dom-id="${id}"]`) as HTMLElement | null;
|
||||
const input = (el?.tagName === 'INPUT' ? el : el?.querySelector('input')) as HTMLInputElement | null;
|
||||
if (!input) return false;
|
||||
input.focus();
|
||||
for (const key of ['Enter', 'ArrowDown']) {
|
||||
input.dispatchEvent(new KeyboardEvent('keydown', { key, bubbles: true, cancelable: true }));
|
||||
}
|
||||
return true;
|
||||
}, domId);
|
||||
expect(fired, 'navkeys <input> found').toBe(true);
|
||||
await expect.poll(() => logs.some((l) => l.includes('charhook key=13')),
|
||||
{ message: 'Enter reached wxEVT_CHAR_HOOK' }).toBe(true);
|
||||
await expect.poll(() => logs.some((l) => l.includes('charhook key=317')),
|
||||
{ message: 'ArrowDown reached wxEVT_CHAR_HOOK' }).toBe(true);
|
||||
await expect.poll(() => logs.filter((l) => l.includes('[UIPOLISH_TEST] textenter')).length,
|
||||
{ message: 'TEXT_ENTER fired once' }).toBe(1);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue