OCPBUGS-105523: Fix flaky perspective query parameter e2e tests - #16940
Conversation
The "Perspective query parameters" tests in other-routes.spec.ts flake for three reasons: no warmupSPA before deep navigation, no guard for the Developer option being available in the switcher menu, and the second test assuming the first test's state without serial execution. Use the shared ensureDeveloperPerspective helper and warmupSPA in both tests, and switch perspective via the query parameter instead of manually clicking unstable menu options. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@rhamilto: This pull request references Jira Issue OCPBUGS-105523, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe perspective query-parameter E2E tests now use shared SPA warmup and Developer perspective helpers. The helper reports whether it changed cluster configuration. The Administrator test verifies the Developer perspective before testing the Administrator parameter. ChangesPerspective query tests
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/jira refresh |
|
Scheduling tests matching the |
|
@rhamilto: This pull request references Jira Issue OCPBUGS-105523, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@rhamilto: This pull request references Jira Issue OCPBUGS-105523, which is valid. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/e2e/tests/console/crud/other-routes.spec.ts`:
- Line 179: Update frontend/e2e/tests/console/crud/other-routes.spec.ts at lines
179-179 and 196-196: in both call sites of ensureDeveloperPerspective, set or
register patchedPerspectives only when the helper actually mutates cluster
perspective configuration, including mutations from the Administrator test, so
suite cleanup removes only test-created configuration.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: dc9fafb5-cf9c-4584-8a3b-6b5909e9a34b
📒 Files selected for processing (1)
frontend/e2e/tests/console/crud/other-routes.spec.ts
ensureDeveloperPerspective is a no-op when the Developer perspective is already available. Return a boolean indicating whether the cluster config was patched so afterAll cleanup only removes test-created configuration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/label tide/merge-method-sqaush |
|
@rhamilto: The label(s) DetailsIn response to this:
Instructions 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. |
|
Scheduling tests matching the |
|
/label tide/merge-method-squash |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: logonoff, rhamilto The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test e2e-playwright |
|
/verified by CI |
|
@rhamilto: This PR has been marked as verified by DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@rhamilto: all tests passed! 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. |
|
@rhamilto: Jira Issue Verification Checks: Jira Issue OCPBUGS-105523 Jira Issue OCPBUGS-105523 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
Analysis / Root cause:
The
console/crud/other-routes.spec.ts"Perspective query parameters" Playwright e2e tests intermittently fail with a 120s test timeout. The error showselement was detached from the DOM, retryingwhen clicking the Developer perspective menu option.Three contributing issues:
Missing
warmupSPA: Tests navigate to deep URLs without first establishing the SPA session, which can land on the OAuth login page.No guard for Developer option availability: The second test clicks the perspective switcher toggle and immediately tries to click the Developer option without verifying it exists and is stable. The option may not be in the DOM yet or gets detached during a re-render.
Assumes serial execution without configuration: The second test assumes the first test enabled the Developer perspective, but the describe block is not configured as serial and each test gets a fresh browser context.
Solution description:
warmupSPAcalls before deep navigation in both testsensureDeveloperPerspectivehelper (which verifies the Developer menu option is actually visible before proceeding)perspective=devquery parameter to switch to Developer perspective instead of manually clicking unstable menu optionsScreenshots / screen recording:
Test setup:
Run the
other-routes.spec.tsPlaywright e2e tests against a cluster.Test cases:
Browser conformance:
Additional info:
Jira: https://redhat.atlassian.net/browse/OCPBUGS-105523
Reviewers and assignees:
Summary by CodeRabbit