INSTUI-4542 Improve Cypress test stability for low-resource environments#1979
Merged
git-nandor merged 1 commit intomasterfrom May 29, 2025
Merged
INSTUI-4542 Improve Cypress test stability for low-resource environments#1979git-nandor merged 1 commit intomasterfrom
git-nandor merged 1 commit intomasterfrom
Conversation
|
There was a problem hiding this comment.
Pull Request Overview
This PR aims to improve the stability of Cypress tests in low-resource environments by introducing explicit waiting periods and updating test configurations. Key changes include:
- Adding explicit cy.wait() calls in component tests (TextArea, Popover, Dialog, and DateInput2) to mitigate flakiness.
- Commenting out one Popover test with a TODO note to convert it to an end-to-end regression test.
- Updating Cypress configuration to include adjusted timeouts and test memory settings.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cypress/component/TextArea.cy.tsx | Added a cy.wait(500) after triggering input to allow the textarea to update its height. |
| cypress/component/Popover.cy.tsx | Commented out an outdated test and added wait periods between actions to improve focus testing. |
| cypress/component/Modal-test-2.cy.tsx | Introduced new Modal tests with explicit waits to verify behavior on key events. |
| cypress/component/Modal-test-1.cy.tsx | Removed duplicate Modal tests now present in Modal-test-2. |
| cypress/component/Dialog.cy.tsx | Added waits after element clicks and tab presses to ensure correct focus management. |
| cypress/component/DateInput2.cy.tsx | Added short waits after button clicks and popover actions to ensure stability. |
| cypress.config.ts | Updated various timeout configurations and memory settings to better support low-resource environments. |
Comments suppressed due to low confidence (1)
cypress/component/Popover.cy.tsx:189
- [nitpick] Instead of a fixed wait after focusing, consider asserting the expected focus state to drive more reliable test behavior.
cy.contains('button', 'trigger btn initial focus me').focus().wait(200)
balzss
reviewed
May 20, 2025
Contributor
balzss
left a comment
There was a problem hiding this comment.
can you try what copilot is suggesting?
de9be40 to
59051e4
Compare
59051e4 to
bb6a517
Compare
Contributor
Author
Yes, the suggestions helped improve the tests for both DateInput2 and TextArea, but didn’t produce better results in all cases. |
balzss
approved these changes
May 28, 2025
ToMESSKa
approved these changes
May 29, 2025
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.
…environments