-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix flaky specs #6197
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 specs #6197
Conversation
5e87b17
to
6694683
Compare
The "spec_helper" does not include all the features necessary for feature specs.
We can't be sure the action has been created without having had confirmation on the screen.
We need to make sure that the browser has updated the page contents before checking for the updated path.
Otherwise, `Spree::Image.first` might not have its attachment yet.
Otherwise, the current path might not be what we expect yet.
Otherwise, the benefit might not have updated in the database yet.
We can just test that the buttons have the necessary attribute for the behaviour. These tests had become flaky.
6694683
to
52791fe
Compare
This should help fix some really ugly flaky test runs. See teamcapybara/capybara#2800 for context.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6197 +/- ##
==========================================
+ Coverage 85.72% 88.81% +3.09%
==========================================
Files 444 836 +392
Lines 10087 18164 +8077
==========================================
+ Hits 8647 16133 +7486
- Misses 1440 2031 +591 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Bless you 🙏🏻
re-ran specs. just out of curiosity |
💔 Some backports could not be created
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Summary
We're experiencing another wave of flaky specs, most likely because chrome or Selenium have become faster. These changes make our test suite wait in appropriate places and stop testing Rails behaviour that we don't need to test.
Checklist
The following are not always needed: