-
Notifications
You must be signed in to change notification settings - Fork 42
[RFR] Revert PR 1679 #1682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFR] Revert PR 1679 #1682
Conversation
Signed-off-by: Nandini Chandra <[email protected]>
WalkthroughIn cypress/e2e/models/migration/applicationinventory/application.ts, the Application.open(forceReload) method is modified. When forceReload is true, a 10-second cy.wait(10 * SEC) is added before asserting the header, and the explicit 10-second timeout option on the h1 selector is removed. A comment referencing Bug MTA-3812 precedes the wait. No public or exported signatures are changed. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
cypress/e2e/models/migration/applicationinventory/application.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
cypress/e2e/models/migration/applicationinventory/application.ts (1)
cypress/e2e/types/constants.ts (2)
SEC(129-129)applicationInventory(20-20)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: e2e-main / e2e-ui-integration-tests
| // Bug MTA-3812 Application Inventory page takes long to load | ||
| // TODO: Wait of 10s to be reduced after above bug is fixed | ||
| cy.wait(10 * SEC); | ||
| cy.get("h1").should("contain", applicationInventory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid fixed waits; keep an explicit timeout on the header to reduce flakiness
A hard 10s wait slows tests and the removal of the explicit timeout on the header weakens resilience. Default Cypress timeout (~4s) may still flake after the 10s wait. Keep the temporary wait if needed for MTA-3812, but reintroduce a longer explicit timeout consistent with the non-reload path.
Apply this diff:
- cy.wait(10 * SEC);
- cy.get("h1").should("contain", applicationInventory);
+ // Temporary wait for MTA-3812; keep explicit timeout to reduce flakiness
+ cy.wait(10 * SEC);
+ cy.get("h1", { timeout: 60 * SEC }).should("contain", applicationInventory);Optional (preferable longer-term): replace the fixed wait with an event-based wait (e.g., intercept the apps API or wait for a stable UI control like items-per-page toggle to be enabled) before asserting the header.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Bug MTA-3812 Application Inventory page takes long to load | |
| // TODO: Wait of 10s to be reduced after above bug is fixed | |
| cy.wait(10 * SEC); | |
| cy.get("h1").should("contain", applicationInventory); | |
| // Bug MTA-3812 Application Inventory page takes long to load | |
| // TODO: Wait of 10s to be reduced after above bug is fixed | |
| // Temporary wait for MTA-3812; keep explicit timeout to reduce flakiness | |
| cy.wait(10 * SEC); | |
| cy.get("h1", { timeout: 60 * SEC }).should("contain", applicationInventory); |
🤖 Prompt for AI Agents
In cypress/e2e/models/migration/applicationinventory/application.ts around lines
162 to 165, remove the flaky pattern of a fixed wait without an explicit
assertion timeout: keep the temporary cy.wait(10 * SEC) if MTA-3812 requires it,
but change the header assertion to include a longer explicit timeout (e.g.,
cy.get("h1", { timeout: 15000 }).should("contain", applicationInventory)) so the
check is resilient; optionally replace the fixed wait with an event-based wait
(intercept the apps API or wait for a specific UI control to become enabled) as
a longer-term improvement.
|
Is this PR still relevant? I see the tests are passing in the pipelines without this being merged Thanks! |
abrugaro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the majority of the tests are passing without this explicit waiting I'd suggets to add it only to the specific test that is affected by the bug.
Otherwise, we are adding 10 seconds to a lot of tests so that will affect the total execution time of all tiers
Hi @abrugaro , I'd like to clarify that the 1) explicit wait is being added only when forceReload is true, not every time the page loads and 2) the after hook() fails in other tests as well when the Application Inventory page is force reloaded. |


#1679 was just a WIP PR to see if behavior had changed in MTA 8.0.0.
The explicit wait is still required for automation to pass.
Summary by CodeRabbit