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
Blocks E2E: Stabilize Product Collection "on sale" tests #44796
Conversation
This test was flaky because we were comparing the current count of elements to an unknown count of elements calculated by `locator.count()`. That method is inherently unstable, because it only counts the currently available elements, where the rest can still be loading. Furthermore, effective tests should verify the system against known, expected outcomes to ensure it behaves as intended under certain conditions. Without comparing to a fixed value, you cannot guarantee that the system is meeting its specified requirements.
Hi @tjcafferkey, @imanish003, @kmanijak, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
Test Results SummaryCommit SHA: 3722918
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
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.
Nice improvements! Reviewing this PR is a quick Playwright tutorial session 😄
Changes proposed in this Pull Request:
Fix flaky
Products can be filtered based on "on sale" status
test.This test was flaky because we compared the current count of elements to an unknown count of elements calculated by
locator.count()
. That method is inherently unstable because it includes only the currently available elements, whereas the rest might still be loading.Clean up the suite & apply some good practices.
How to test the changes in this Pull Request:
There no need to test manually. This suite should pass in CI. For safe measure, it should be restarted a couple of times to ensure the aforementioned test was indeed stabilized.