Skip to content
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

test: Wait for modal to open before testing its content #5993

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Dec 3, 2024

Capybara needs to be told to expect that the modal is open before we can check for content present in it.

Fixes a lot of extremely flaky specs.

Capybara needs to be told to expect that the modal is open
before we can check for content present in it.

Fixes a lot of extremely flaky specs.
@tvdeyen tvdeyen requested a review from a team as a code owner December 3, 2024 16:06
If the modal cannot be openend after 5 seconds (Capybara default wait
tiem is 3 seconds) then something is wrong. We must not waste
precious resources and time for a buld to fail.
@github-actions github-actions bot added changelog:solidus_legacy_promotions Changes to the solidus_legacy_promotions gem changelog:solidus_promotions Changes to the solidus_promotions gem labels Dec 3, 2024
@tvdeyen
Copy link
Member Author

tvdeyen commented Dec 3, 2024

@MadelineCollier this should make your life a bit easier.

@tvdeyen tvdeyen merged commit 27c64c7 into solidusio:main Dec 3, 2024
14 checks passed
@tvdeyen tvdeyen deleted the harden-admin-feature-specs branch December 3, 2024 16:32
@tvdeyen tvdeyen added backport-v4.2 Backport this pull-request to v4.2 backport-v4.3 Backport this pull-request to v4.3 backport-v4.4 Backport this pull-request to v4.4 labels Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

💔 Some backports could not be created

Status Branch Result
v4.2 Backport failed because of merge conflicts

You might need to backport the following PRs to v4.2:
- Merge pull request #5979 from mamhoff/fix-missing-translation-spec
- Merge pull request #5956 from mamhoff/allow-passing-in-user-class
- Merge pull request #5954 from SuperGoodSoft/fix/new-rubocop-rules
v4.3 Backport failed because of merge conflicts
v4.4

Manual backport

To create the backport manually run:

backport --pr 5993

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Copy link

github-actions bot commented Dec 3, 2024

💔 Some backports could not be created

Status Branch Result
v4.2 Backport failed because of merge conflicts

You might need to backport the following PRs to v4.2:
- Merge pull request #5979 from mamhoff/fix-missing-translation-spec
- Merge pull request #5956 from mamhoff/allow-passing-in-user-class
- Merge pull request #5954 from SuperGoodSoft/fix/new-rubocop-rules
v4.3 Backport failed because of merge conflicts
v4.4

Manual backport

To create the backport manually run:

backport --pr 5993

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Copy link

github-actions bot commented Dec 3, 2024

💔 Some backports could not be created

Status Branch Result
v4.2 Backport failed because of merge conflicts

You might need to backport the following PRs to v4.2:
- Merge pull request #5979 from mamhoff/fix-missing-translation-spec
- Merge pull request #5956 from mamhoff/allow-passing-in-user-class
- Merge pull request #5954 from SuperGoodSoft/fix/new-rubocop-rules
v4.3 Backport failed because of merge conflicts
v4.4

Manual backport

To create the backport manually run:

backport --pr 5993

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@tvdeyen
Copy link
Member Author

tvdeyen commented Dec 3, 2024

💚 All backports created successfully

Status Branch Result
v4.3

Questions ?

Please refer to the Backport tool documentation

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.46%. Comparing base (ad84609) to head (7112488).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5993   +/-   ##
=======================================
  Coverage   89.46%   89.46%           
=======================================
  Files         782      782           
  Lines       17999    17999           
=======================================
  Hits        16102    16102           
  Misses       1897     1897           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MadelineCollier
Copy link
Contributor

@MadelineCollier this should make your life a bit easier.

Thanks @tvdeyen ! Dealing with a few flaky specs relating to this as we speak

MadelineCollier added a commit to MadelineCollier/solidus that referenced this pull request Dec 4, 2024
Building off of solidusio#5993, a few
more specs required a short wait time to give the modal a chance to
load. They were flaky (failing somewhat regularly in CI, but always
passing locally) and this should help remedy that.
@tvdeyen
Copy link
Member Author

tvdeyen commented Dec 4, 2024

@MadelineCollier this should make your life a bit easier.

Thanks @tvdeyen ! Dealing with a few flaky specs relating to this as we speak

Unfortunately some are still flaky and most of that can only be solved by fixing the underlying issues (as mentioned in #5945) with how the new admin is implemented. As we continue to build on top of that, I would suggest to not just copy existing specs as we making the issues worse.

github-actions bot pushed a commit that referenced this pull request Dec 4, 2024
Building off of #5993, a few
more specs required a short wait time to give the modal a chance to
load. They were flaky (failing somewhat regularly in CI, but always
passing locally) and this should help remedy that.

(cherry picked from commit a25a62a)
github-actions bot pushed a commit that referenced this pull request Dec 4, 2024
Building off of #5993, a few
more specs required a short wait time to give the modal a chance to
load. They were flaky (failing somewhat regularly in CI, but always
passing locally) and this should help remedy that.

(cherry picked from commit a25a62a)
github-actions bot pushed a commit that referenced this pull request Dec 4, 2024
Building off of #5993, a few
more specs required a short wait time to give the modal a chance to
load. They were flaky (failing somewhat regularly in CI, but always
passing locally) and this should help remedy that.

(cherry picked from commit a25a62a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v4.2 Backport this pull-request to v4.2 backport-v4.3 Backport this pull-request to v4.3 backport-v4.4 Backport this pull-request to v4.4 changelog:solidus_admin changelog:solidus_legacy_promotions Changes to the solidus_legacy_promotions gem changelog:solidus_promotions Changes to the solidus_promotions gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants