test(billing): disambiguate payment-success assertion in managed-wallet e2e - #3426
Merged
Merged
Conversation
…et e2e After #3412 a successful purchase renders two "Payment successful" elements at once — the PaymentSuccessAnimation overlay (role="dialog") and the PaymentPollingProvider snackbar (role="alert"). The case- insensitive getByText("Payment Successful!") matched both, triggering a Playwright strict-mode violation on the beta e2e gate. Scope the assertion to the celebration overlay's dialog heading via a new BillingPage.getPaymentSuccessMessage() locator so it resolves to a single element. Ref #3412
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3426 +/- ##
==========================================
- Coverage 72.27% 71.15% -1.13%
==========================================
Files 1157 1067 -90
Lines 29299 26999 -2300
Branches 7253 6802 -451
==========================================
- Hits 21175 19210 -1965
+ Misses 7136 6831 -305
+ Partials 988 958 -30
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The beta Console web UI e2e gate (
Test beta (NA) / Test staging) is failing onmanaged-wallet-credits.spec.ts, which blocks the beta → prod deploy (failing run).It is not a broken payment — the charge succeeds (the "verify balance increased" step passes and the trace has the Stripe receipts). It's a Playwright strict-mode violation: after #3412 a successful purchase renders two "Payment successful" elements at the same time, and the assertion matched both:
<h2>Payment Successful!</h2>PaymentSuccessAnimationcelebration overlaydialog<h5>Payment successful!</h5>PaymentPollingProvidersuccess snackbaralertpage.getByText("Payment Successful!")is case-insensitive by default, so it resolved to both headings. #3412 defers the overlay (onDone) until polling settles — right after the snackbar appears — so the two now reliably overlap; previously the overlay fired at charge time, usually before the snackbar.Ref #3412
What
BillingPage.getPaymentSuccessMessage()that scopes to the overlay'srole="dialog"heading, excluding the snackbarrole="alert"heading of the same words.getByText.Validation — reconstructed the real page DOM from the failing CI trace and ran both locators through the Playwright engine:
"Payment Successful!")