You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E2E speedup (Step 6e): convert F-key tests to dispatchMenuCommand to eliminate keystroke-dispatch flake
Synthesized `tauriPage.keyboard.press('F5')` events don't always reach
`handleGlobalKeyDown` under parallel-shard load — focus can drift after
async MCP nav, and the document-level listener occasionally misses the
event. The `dispatchMenuCommand` helper emits the `execute-command` Tauri
event directly, mimicking the OS native menu accelerator path used in
prod. It's unaffected by DOM focus state and parallel-load timing.
Converted (28 dispatches across 16 tests where the test cares about the
resulting dialog / file state, not the keyboard pathway):
- conflict-copy.spec.ts: 7 × F5 → file.copy
- conflict-move.spec.ts: 3 × F6 → file.move
- conflict-edge-cases.spec.ts: 8 × F5 → file.copy
- mtp-conflicts.spec.ts: 5 × F6 → file.move
- accessibility.spec.ts: F5/F6/F8 → file.copy/move/delete, plus the ⌘F
dispatch in openSearchDialog → search.open
- file-watching.spec.ts: 1 × F5 → file.copy
Kept on keyboard pathway (15 dispatches in tests that exist to verify
the keyboard route itself):
- app.spec.ts: 6 tests like "opens copy dialog with F5", "opens new
folder dialog with F7", etc.
- file-operations.spec.ts: 4 round-trip tests with "...via F5/F6/F2/F7"
in their titles
- mtp.spec.ts: 5 dispatches across the "renames file on MTP via
keyboard" tests, the MTP delete dialog flow (comment marks it as
full-keyboard), and "read-only storage rejects write operations"
(verifies the read-only pre-check fires from the keyboard path)
Validation — three back-to-back `./scripts/check.sh --check
desktop-e2e-playwright` runs on native macOS with parallel shards:
Pass 1: 131 passed, 0 failed, 0 flakes — 3m 13s
Pass 2: 131 passed, 0 failed, 0 flakes — 3m 11s
Pass 3: 131 passed, 0 failed, 0 flakes — 3m 10s
Matches the 0/0/0 target. The keystroke-dispatch flake (0-1-2-5-10
flakes/run observed during Step 6a/6b/6d validation) is gone. No new
flake categories surfaced. Full `./scripts/check.sh` sweep also green
(45 checks in 2m 29s).
Test files only — no app source changes.
0 commit comments