-
Notifications
You must be signed in to change notification settings - Fork 113
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
Fix Flaky Discover Table Tests #1377
Conversation
); | ||
cy.waitForLoader(); |
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.
why did you change this? wait for loader is more reliable since it waits for a specific element and not just the an arbitrary time which can cause the test to become flakey
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.
While running the tests, I found that waiting for page load didn't make sense in few occasions. While applying the filter to a table the entire page doesn't reload. In those scenarios(using waitForLoader) instead of waiting for the number of entires to change in table , cypress picks up the older table result and the evaluation condition fails.
To avoid such scenarios I have put a wait time.
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.
@ashwin-pc Updated the PR to remove waits, instead added verification for hits which has resolved the previous issues.
Signed-off-by: Suchit Sahoo <suchsah@amazon.com>
c8cbf04
into
opensearch-project:main
Signed-off-by: Suchit Sahoo <suchsah@amazon.com> (cherry picked from commit c8cbf04)
Description
Fix Flaky tests in Discover Table.
Without Security
discover_table.spec.js.mp4
With Security
discover_table.spec.js.mp4
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.