Skip to content

test(billing): disambiguate payment-success assertion in managed-wallet e2e - #3426

Merged
baktun14 merged 1 commit into
mainfrom
test/billing-payment-success-e2e-locator
Jul 14, 2026
Merged

test(billing): disambiguate payment-success assertion in managed-wallet e2e#3426
baktun14 merged 1 commit into
mainfrom
test/billing-payment-success-e2e-locator

Conversation

@baktun14

Copy link
Copy Markdown
Contributor

Why

The beta Console web UI e2e gate (Test beta (NA) / Test staging) is failing on managed-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:

Element Source Container role
<h2>Payment Successful!</h2> PaymentSuccessAnimation celebration overlay dialog
<h5>Payment successful!</h5> PaymentPollingProvider success snackbar alert

page.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

  • Add BillingPage.getPaymentSuccessMessage() that scopes to the overlay's role="dialog" heading, excluding the snackbar role="alert" heading of the same words.
  • Use it in the "verify payment success" step instead of the loose getByText.
  • No product/runtime code changed.

Validation — reconstructed the real page DOM from the failing CI trace and ran both locators through the Playwright engine:

  • old locator → 2 matches + the exact CI strict-mode violation
  • new locator → exactly 1 match, visible ("Payment Successful!")

Note (non-blocking): a successful purchase now shows both the full-screen overlay and the toast — redundant UX that #3412's timing change made simultaneous. Out of scope here; can be de-duped separately if desired.

…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

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.15%. Comparing base (f1b322b) to head (223e75b).
✅ All tests successful. No failed tests found.

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     
Flag Coverage Δ *Carryforward flag
api 85.57% <ø> (ø) Carriedforward from f1b322b
deploy-web 61.05% <ø> (ø)
log-collector ?
notifications 91.44% <ø> (ø) Carriedforward from f1b322b
provider-console 81.38% <ø> (ø) Carriedforward from f1b322b
provider-inventory ?
provider-proxy 86.42% <ø> (ø) Carriedforward from f1b322b
tx-signer ?

*This pull request uses carry forward flags. Click here to find out more.
see 90 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Auto-approved: all changes are related to tests.

@baktun14
baktun14 added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 2b63529 Jul 14, 2026
176 of 179 checks passed
@baktun14
baktun14 deleted the test/billing-payment-success-e2e-locator branch July 14, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant