fix(e2e): use scoped menuitem locator for Settings in profile dropdown [AI /e2e-fix]#4590
Conversation
|
Skipping CI for Draft Pull Request. |
|
/agentic_review |
|
/test ? |
Code Review by Qodo
|
|
/test e2e-ocp-helm-nightly |
The goToSettingsPage() method used clickLink('Settings') which resolves to
locator('a').filter({ hasText: 'Settings' }).first() — a broad selector
that can match hidden <a> elements elsewhere in the page. Under CI
conditions (3 workers, slower rendering), the dropdown menuitem is found
but not visible in time, causing TimeoutError.
Replace with getByRole('menuitem', { name: 'Settings' }) which precisely
targets the profile dropdown menuitem. This matches the fix already on
main (PR redhat-developer#4436).
Assisted-by: OpenCode
29c7f6b to
d691a0a
Compare
|
/agentic_review |
|
Persistent review updated to latest commit d691a0a |
|
/test ? |
|
/test e2e-ocp-helm-nightly |
Code Review by Qodo
|
Review Summary by QodoFix Settings link selector in profile dropdown for CI stability
WalkthroughsDescription• Replace broad link selector with scoped menuitem locator in Settings navigation
• Use getByRole("menuitem") to precisely target dropdown Settings item
• Add visibility check before clicking to prevent timeout errors
• Aligns with existing fix on main branch (PR #4436)
Diagramflowchart LR
A["goToSettingsPage()"] -->|"Old: clickLink('Settings')"| B["Broad selector<br/>matches hidden elements"]
B -->|"CI conditions"| C["TimeoutError"]
A -->|"New: getByRole('menuitem')"| D["Scoped dropdown selector"]
D -->|"+ visibility check"| E["Reliable click"]
File Changes1. e2e-tests/playwright/utils/ui-helper.ts
|
|
The hardcoded |
|
/retest |
|
/test e2e-ocp-helm |
|
The container image build workflow finished with status: |
…lity - Use scoped menuitem locator for Settings in profile dropdown (redhat-developer#4590) - Fix bulk-import tests: optional chaining for env vars, nightly-only check, retry with filterAndVerifyAddedRepo, correct status text (redhat-developer#4583) - Fix FAB sub-menu click stability with dispatchEvent and toBeVisible guard (redhat-developer#4591) Assisted-by: OpenCode
…lity - Use scoped menuitem locator for Settings in profile dropdown (redhat-developer#4590) - Fix bulk-import tests: optional chaining for env vars, nightly-only check, retry with filterAndVerifyAddedRepo, correct status text (redhat-developer#4583) - Fix FAB sub-menu click stability with dispatchEvent and toBeVisible guard (redhat-developer#4591) Assisted-by: OpenCode
…lity - Use scoped menuitem locator for Settings in profile dropdown (redhat-developer#4590) - Fix bulk-import tests: optional chaining for env vars, nightly-only check, retry with filterAndVerifyAddedRepo, correct status text (redhat-developer#4583) - Fix FAB sub-menu click stability with dispatchEvent and toBeVisible guard (redhat-developer#4591) Assisted-by: OpenCode
…lity - Use scoped menuitem locator for Settings in profile dropdown (redhat-developer#4590) - Fix bulk-import tests: optional chaining for env vars, nightly-only check, retry with filterAndVerifyAddedRepo, correct status text (redhat-developer#4583) - Fix FAB sub-menu click stability with dispatchEvent and toBeVisible guard (redhat-developer#4591) Assisted-by: OpenCode
|
@zdrapela: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
goToSettingsPage()usedclickLink("Settings")which resolves tolocator('a').filter({ hasText: 'Settings' }).first()— a broad selector matching any<a>with "Settings" text. Under CI conditions, hidden elements match first and the dropdown menuitem times out.getByRole("menuitem", { name: "Settings" })to precisely target the dropdown menuitem, matching the fix already onmain(PR fix(e2e): fix custom-theme test navigation and overlay issues #4436).Test Results
Related