Skip to content

Conversation

@MadelineCollier
Copy link
Contributor

@MadelineCollier MadelineCollier commented Dec 4, 2024

Building off of #5993, a few more specs required a short wait time to give the modal a chance to load. Capybara waits for 2 seconds by default but this raises the wait to 5 seconds. They were flaky (failing somewhat regularly in CI, but always passing locally) and this should help remedy that.

Screenshot 2024-12-04 at 9 42 56 AM

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.
@MadelineCollier MadelineCollier requested a review from a team as a code owner December 4, 2024 08:43
@MadelineCollier MadelineCollier changed the title Wait for modal before testing its content [specs] Wait for modal before testing its content Dec 4, 2024
@codecov
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5998   +/-   ##
=======================================
  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.

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify: Capybara already waits 2 seconds by default. This change "just" raises the wait time to 5 seconds. We should reflect that in the commit message (and PR description) so that we do not give the impression to contributors that waiting was disabled. This is ok for now, but also slows down the test suite in case of an error in the implementation.

The actual underlying issue is that we need to use a fully JS enabled browser to test simple CRUD actions in the new admin. This can only be solved by fixing the implementation (see #5945 for background) or by not writing those UX tests. They are not very valuable, as they do not test business logic, but the questionable UX of the new admin.

@MadelineCollier
Copy link
Contributor Author

Just to clarify: Capybara already waits 2 seconds by default. This change "just" raises the wait time to 5 seconds. We should reflect that in the commit message (and PR description) so that we do not give the impression to contributors that waiting was disabled. This is ok for now, but also slows down the test suite in case of an error in the implementation.

The actual underlying issue is that we need to use a fully JS enabled browser to test simple CRUD actions in the new admin. This can only be solved by fixing the implementation (see #5945 for background) or by not writing those UX tests. They are not very valuable, as they do not test business logic, but the questionable UX of the new admin.

Fair points!

@MadelineCollier MadelineCollier merged commit 81c605c into solidusio:main Dec 4, 2024
16 checks passed
@tvdeyen
Copy link
Member

tvdeyen commented Dec 4, 2024

Just to clarify: Capybara already waits 2 seconds by default. This change "just" raises the wait time to 5 seconds. We should reflect that in the commit message (and PR description) so that we do not give the impression to contributors that waiting was disabled. This is ok for now, but also slows down the test suite in case of an error in the implementation.
The actual underlying issue is that we need to use a fully JS enabled browser to test simple CRUD actions in the new admin. This can only be solved by fixing the implementation (see #5945 for background) or by not writing those UX tests. They are not very valuable, as they do not test business logic, but the questionable UX of the new admin.

Fair points!

Ah, dang. The commit message has not been changed, right?

@tvdeyen
Copy link
Member

tvdeyen commented Dec 4, 2024

We should reflect that in the commit message (and PR description) so that we do not give the impression to contributors that waiting was disabled.

@MadelineCollier
Copy link
Contributor Author

We should reflect that in the commit message (and PR description) so that we do not give the impression to contributors that waiting was disabled.

Oh apologies I updated the PR description but forgot to edit the commit

@tvdeyen
Copy link
Member

tvdeyen commented Dec 4, 2024

No worries :)

@tvdeyen tvdeyen added backport-v4.1 Backport this pull-request to v4.1 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 4, 2024
@github-actions
Copy link

github-actions bot commented Dec 4, 2024

💔 All backports failed

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

You might need to backport the following PRs to v4.1:
- 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.2 Backport failed because of merge conflicts

You might need to backport the following PRs to v4.2:
- Merge pull request #5993 from tvdeyen/harden-admin-feature-specs
- test: Do not wait 30 seconds for a test to fail
- test: Wait for modal to open before testing its content
- 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

You might need to backport the following PRs to v4.3:
- test: Wait for modal to open before testing its content
v4.4 An unhandled error occurred. Please see the logs for details

Manual backport

To create the backport manually run:

backport --pr 5998

Questions ?

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

@github-actions
Copy link

github-actions bot commented Dec 4, 2024

💔 Some backports could not be created

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

You might need to backport the following PRs to v4.1:
- 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.2 Backport failed because of merge conflicts

You might need to backport the following PRs to v4.2:
- Merge pull request #5993 from tvdeyen/harden-admin-feature-specs
- test: Do not wait 30 seconds for a test to fail
- test: Wait for modal to open before testing its content
- 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

You might need to backport the following PRs to v4.3:
- test: Wait for modal to open before testing its content
v4.4

Manual backport

To create the backport manually run:

backport --pr 5998

Questions ?

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

@github-actions
Copy link

github-actions bot commented Dec 4, 2024

💔 Some backports could not be created

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

You might need to backport the following PRs to v4.1:
- 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.2 Backport failed because of merge conflicts

You might need to backport the following PRs to v4.2:
- Merge pull request #5993 from tvdeyen/harden-admin-feature-specs
- test: Do not wait 30 seconds for a test to fail
- test: Wait for modal to open before testing its content
- 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

You might need to backport the following PRs to v4.3:
- test: Wait for modal to open before testing its content
v4.4

Manual backport

To create the backport manually run:

backport --pr 5998

Questions ?

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

@github-actions
Copy link

github-actions bot commented Dec 4, 2024

💔 Some backports could not be created

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

You might need to backport the following PRs to v4.1:
- 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.2 Backport failed because of merge conflicts

You might need to backport the following PRs to v4.2:
- Merge pull request #5993 from tvdeyen/harden-admin-feature-specs
- test: Do not wait 30 seconds for a test to fail
- test: Wait for modal to open before testing its content
- 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

You might need to backport the following PRs to v4.3:
- test: Wait for modal to open before testing its content
v4.4

Manual backport

To create the backport manually run:

backport --pr 5998

Questions ?

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

@tvdeyen tvdeyen removed backport-v4.1 Backport this pull-request to v4.1 backport-v4.2 Backport this pull-request to v4.2 backport-v4.3 Backport this pull-request to v4.3 labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v4.4 Backport this pull-request to v4.4 changelog:solidus_admin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants