Repository navigation
Conversation
The ui project runs with devices['Desktop Chrome'], whose user agent
says Windows on every host, so the app binds its Ctrl/Cmd shortcuts to
Ctrl. Playwright's ControlOrMeta follows the host instead and presses
Meta on a Mac, so eight keyboard and command palette specs failed there
while passing in CI on Linux.
Have the ui project report Linux, which HomeShell supports where it does
not support Windows. Add a ui-mac project that runs the keyboard specs
in Desktop Chrome made to report macOS, and mod and mac fixtures that
follow the project's user agent as the app's isMac does. The specs press
`${mod}+K` and expect each platform's labels exactly, and lint rejects
ControlOrMeta. The Mac's own behavior gets coverage: Option marks no
letters from a text box, and the list names Meta+Backspace as Delete.
make test-e2e runs every project, and E2E_ARGS passes Playwright
arguments. The Linux CI job runs api and ui only; the macOS job of eclipse-enclave#39
will run ui-mac.
Fixes eclipse-enclave#37
Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
EclipseSourceAI
left a comment
There was a problem hiding this comment.
Note
Autonomous AI review. May contain mistakes.
Useful comment? React 👍. Disagree? React 👎 to reject it for follow-up reviews. A reply explaining why helps too.
Agent approval means no blocking issues found. Unrelated and Follow-up comments are non-blocking. A maintainer must still sign off.
Only a maintainer can re-request a review from this agent.
Powered by Eclipse Enclave via review-guard-mcp
This fixes #37. The e2e keyboard specs used ControlOrMeta, which follows the host OS, while the ui project's browser always reported Windows. So on a Mac host, the app bound Ctrl while Playwright pressed Cmd.
How the PR fixes it:
uinow reports Linux.- A new
ui-macproject runs the keyboard specs with a macOS user agent. - Two new fixtures,
modandmac, read the platform from the project's user agent, as the app'sisMacdoes. Specs now check each platform's exact labels. - An ESLint
no-restricted-syntaxrule bansControlOrMetaundersrc/ui. make test-e2egetsE2E_ARGS. CI is limited toapiandui.
The approach looks right. chromeOn fails loudly if the user agent format changes, and moving the test.skip in keyboard-list.spec.ts to the fixture means liveCard no longer runs before the test is skipped. The docs (docs/DEV.md) are updated, and none in the changelog block fits a test-only change.
Points for the maintainers:
- CI scope:
ui-maconly emulates the user agent, yet it's left out of the Linux CI job, even thoughmake test-e2eruns it locally on Linux (inline). - Mac coverage gap: Cmd+Backspace deleting a row, the Mac's main list-specific key, still has no positive e2e test under
ui-mac(inline).
I couldn't run make test-e2e here because the review environment has no Go toolchain or node_modules, so whether ui-mac passes on a Linux host is unverified. I skipped a visual UI check because the PR changes only tests and tooling, not app behavior.
The spec that Meta+Backspace deletes nothing off a Mac skips under ui-mac, which left the Mac's own delete key without an e2e test. Its counterpart there presses Cmd+Backspace on a focused row, expects the delete confirmation, and checks that the row names Meta+Backspace in aria-keyshortcuts. Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
EclipseSourceAI
left a comment
There was a problem hiding this comment.
Note
Autonomous AI review. May contain mistakes.
Useful comment? React 👍. Disagree? React 👎 to reject it for follow-up reviews. A reply explaining why helps too.
Agent approval means no blocking issues found. Unrelated and Follow-up comments are non-blocking. A maintainer must still sign off.
Only a maintainer can re-request a review from this agent.
Powered by Eclipse Enclave via review-guard-mcp
Follow-up review. Since my last pass, the only code change is d9225a7, adding Cmd+Backspace asks to delete the focused row on a Mac to keyboard-list.spec.ts. It mirrors the existing Delete asks on Cancel; Escape and Enter both keep the row test closely (same dialog, Cancel focus, Escape, row refocus) and checks aria-keyshortcuts includes Meta+Backspace, so it's a solid fix for the Mac coverage gap I flagged.
On the CI scope thread, I verified the maintainer's reply: make test-e2e with no E2E_ARGS does run all three Playwright projects (Makefile:404), and the CI build-and-e2e job does pin --project=api --project=ui, so the platform split is intentional, not an oversight. Replied in the thread accepting the trade-off until the macOS CI job lands; nothing blocking here.
No other findings. Squash suggestion for the two commits of this PR:
test(e2e): Run the keyboard specs as on Linux and as on a Mac (#44)
* test(e2e): Run the keyboard specs as on Linux and as on a Mac
The `ui` project emulates Desktop Chrome on Windows on every host, so the
app binds Ctrl/Cmd to Ctrl, but `ControlOrMeta` presses Cmd on a Mac.
Eight keyboard and command palette specs failed on macOS because of it.
`ui` now reports Linux. A new `ui-mac` project runs the keyboard specs
(`keyboard-*`, `shortcuts`, `command-palette`, `mnemonics`) in Desktop
Chrome made to report macOS. Two fixtures follow the project's user
agent, as the app's `isMac` does: `mod` is the app's Ctrl/Cmd key, and
`mac` lets a spec expect each platform's exact labels.
Lint rejects `ControlOrMeta` in `src/ui`. `make test-e2e` gets
`E2E_ARGS`; CI stays limited to `api` and `ui`.
Fixes #37
Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
* test(e2e): Check a Mac's Cmd+Backspace on a focused row
The spec that Meta+Backspace deletes nothing off a Mac skips under
ui-mac, which left the Mac's own delete key without an e2e test. Its
counterpart presses Cmd+Backspace on a focused row, expects the delete
confirmation, and checks that the row names Meta+Backspace in
aria-keyshortcuts.
Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
These previous comments can be resolved as they are now handled:
I can't resolve them myself as I would need write permission on this repository.
Fixes #37
What and why
The
uiproject emulates Desktop Chrome on Windows on every host, so the app binds Ctrl/Cmd to Ctrl, butControlOrMetapresses Cmd on a Mac. Eight keyboard and command palette specs failed on macOS because of it.The
uiproject now reports Linux instead, since HomeShell doesn't support Windows. A newui-macproject runs the keyboard specs (keyboard-*,shortcuts,command-palette, andmnemonics) in Desktop Chrome made to report macOS. Two fixtures follow the project's user agent, as the app'sisMacdoes:modis the app's Ctrl/Cmd key, so a spec presses`${mod}+K`.maclets a spec expect each platform's labels exactly, such as⌘Enter selectorCtrl+Enter select, where it used to accept either.Lint rejects
ControlOrMetainsrc/ui, because it follows the host instead.The Mac's own behavior now has e2e coverage too: Option marks no letters from a text box, and the list's description names Meta+Backspace as a Delete key. The tests for the opposite behavior skip under
ui-mac.make test-e2eruns every project, and the newE2E_ARGSpasses arguments to Playwright. The Linux CI job runsapianduionly. The macOS job of #39 will runui-mac.On macOS, the keyboard specs pass under both
uiandui-mac.Changelog
Checklist
AGENTS.md)AGENTS.md