Repository navigation
test(playwright): open selects from the arrow, not the centre - #8114
Merged
Merged
Conversation
selectValueInNgSelector clicked the centre of the select. An empty select's unfloated mat-label can cover that point (the label has pointer-events: all), so Playwright reported the label as intercepting the click and timed out. The page gutter from #8109 narrowed the planning-create grid enough for this to happen on #createPlanningSelector. Click the always-rendered arrow, which opens the select exactly once. closes #8113 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused change addresses the reported Playwright hit-testing failure without affecting application behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the Playwright ng-select helper to avoid label interception when opening mtx-select.
Changes:
- Opens selectors by clicking
.ng-arrow-wrapper. - Documents why center-clicking is unreliable.
| File | Description |
|---|---|
eform-client/playwright/e2e/helper-functions.ts |
Uses the select arrow as the reliable click target. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8113
selectValueInNgSelectorclicked the centre of the select. On an emptymtx-selectinside an outlinedmat-form-fieldthe unfloatedmat-labelcan cover that point (Material setspointer-events: allon the floating label), and Playwright then retries until timeout: "Valgt eForm … intercepts pointer events".#8109's page gutter narrowed the planning-create grid by ~15 px per column, which put
#createPlanningSelector's centre on its 81 px label. That brokeitems-planning-playwright-test (b)and(c)in microting/work-items-planning-container run 37216811181 and in the items-planning plugin's own CI. It passed before by about 1 px.Users are not affected: a click on the label goes through the form field's
onContainerClick, which opens the select. Only Playwright's hit-test fails.Fix: click
.ng-arrow-wrapper, which ng-select always renders. Its mousedown toggles the panel once, and mtx-select'sonContainerClickdeliberately skips the arrow, so there is no double toggle. If the panel is already open, the helper's nextfill()reopens it viafilter().Callers: this repo's two selectors (
#createLanguageSelector,#mainCheckListTagsSelector) aremtx-selecthosts. A sample of the plugin callers that import this helper (items-planning, backend-configuration, time-planning, …) all passmtx-selecthosts too.Verification: Playwright runs only in CI; this PR's run and the next container tag run are the real test.
🤖 Generated with Claude Code