-
Notifications
You must be signed in to change notification settings - Fork 68
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
E2E: Fix the dispute save draft challenge failing due to redirect race condition #9284
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.32 MB ℹ️ View Unchanged
|
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.
Hey @Jinksi, I've been reviewing this PR and wanted to leave my feedback here as well. I think both PRs address the issue effectively, with your approach incorporating a bit more navigation, which adds some robustness, though it might take a few seconds longer. I'm happy to approve your PR—please share your thoughts so we can decide whether to merge Daniel's PR or yours. Thanks for fixing this 🚀
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.
I like this solution better over what I implemented on #9275 as it seems more explicit on what it's doing. I'll close mine in favor of this. |
Thanks @danielmx-dev – My apologies for not spotting your PR earlier. It's a small difference either way, but I also prefer this PR's solution since it is closer to the merchant's flow: click save button → follow page redirect → navigate back to dispute details (in the future). |
Failing E2E Playwright tests are not related to this PR – checkout failures. |
All tests are now passing on E2E Tests - All for this branch – merging. |
Fixes #9281
Changes proposed in this Pull Request
This PR fixes the failing e2e test
Disputes > Merchant can save and resume draft dispute challenge
which is failing due to a redirect to the dispute list screen.Previously, this redirect was slow enough to allow the dispute details page refresh to occur beforehand.
I suspect an improvement in e2e environment performance is now causing the redirect to occur before the page refresh can, causing the test to check against the wrong screen (disputes list rather than dispute details). This e2e test first started failing alongside #9109, but it may just be a coincidence.
The fix in this PR will wait for the redirect to occur before navigating to the dispute details screen.
Testing instructions
E2E tests all
Disputes > Merchant can save and resume draft dispute challenge
tests pass.wcpay - merchant
workflows and search formerchant-disputes-save-draft-challenge.spec.js
npm run test:e2e-setup
ornpm run test:e2e-up
if already setupnpm run test:e2e -- tests/e2e/specs/wcpay/merchant/merchant-disputes-*
to run all merchant disputes testsnpm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge