Skip to content

test(e2e): add Paddle happy-path purchases for inline and overlay (WST-714)#920

Closed
rogersole wants to merge 5 commits into
roger/wst-713-paddle-e2e-cancel-flowsfrom
roger/wst-714-paddle-e2e-happy-paths
Closed

test(e2e): add Paddle happy-path purchases for inline and overlay (WST-714)#920
rogersole wants to merge 5 commits into
roger/wst-713-paddle-e2e-cancel-flowsfrom
roger/wst-714-paddle-e2e-happy-paths

Conversation

@rogersole

@rogersole rogersole commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on #919. Completes the WST-564 happy-path requirement for both presentation modes — both tests complete real Paddle sandbox purchases, and they run on CI (the WST-709 spike, #923, confirmed Paddle sandbox completes purchases from CircleCI IPs — no Stripe-style CAPTCHA gating needed).

  • Inline: forced inline → sandbox banner + RC order summary visible (presence only — exact totals depend on checkout.updated timing) → form completion in the container-scoped frame → processing-state-or-success race → 'Payment complete' → Continue → /success/ → entitlement-gated success content ('Enjoy your premium experience.').
  • Overlay: forced overlay → form completion in Paddle's overlay frame → 'Payment complete' → Continue → /success/ → entitlement-gated success content.

Part of WST-564 (subtask WST-714).

Test plan

🤖 Generated with Claude Code


Note

Low Risk
Test-only changes in the webbilling demo; no production billing or app logic is modified.

Overview
Adds end-to-end happy-path purchase coverage for Paddle in the webbilling demo, parameterized for inline and overlay checkout modes. Each test forces the mode, starts a purchase from the paywall, fills the Paddle checkout in the correct iframe, and asserts through payment complete → Continue → /success/ with entitlement copy ("Enjoy your premium experience.").

A shared confirmSuccessPage helper centralizes the post-payment navigation and success assertions. Inline tests additionally check RC chrome (sandbox banner, .rcb-paddle-summary) and tolerate a race between processing UI and success; overlay tests target Paddle’s overlay frame. The existing checkout/start error scenario is unchanged.

Reviewed by Cursor Bugbot for commit ad6c5c9. Bugbot is set up for automated code reviews on this repo. Configure here.

@rogersole rogersole force-pushed the roger/wst-713-paddle-e2e-cancel-flows branch from cd704fb to 587e5aa Compare June 10, 2026 14:28
@rogersole rogersole force-pushed the roger/wst-714-paddle-e2e-happy-paths branch from 11e162c to 5f2e4cb Compare June 10, 2026 14:28
@rogersole rogersole force-pushed the roger/wst-713-paddle-e2e-cancel-flows branch from 587e5aa to bbb5362 Compare June 10, 2026 14:40
@rogersole rogersole force-pushed the roger/wst-714-paddle-e2e-happy-paths branch 2 times, most recently from 3945347 to 4bc31f9 Compare June 10, 2026 14:41
@rogersole rogersole force-pushed the roger/wst-713-paddle-e2e-cancel-flows branch from bbb5362 to f6a20cd Compare June 10, 2026 16:00
@rogersole rogersole force-pushed the roger/wst-714-paddle-e2e-happy-paths branch from 4bc31f9 to 209de3b Compare June 10, 2026 16:01
@rogersole rogersole force-pushed the roger/wst-713-paddle-e2e-cancel-flows branch from f6a20cd to 9e25cc2 Compare June 10, 2026 16:06
@rogersole rogersole force-pushed the roger/wst-714-paddle-e2e-happy-paths branch from 209de3b to 43a7c79 Compare June 10, 2026 16:06
@rogersole rogersole marked this pull request as ready for review June 10, 2026 16:10
@rogersole

Copy link
Copy Markdown
Contributor Author

Verified locally against the sandbox: both happy paths complete real sandbox purchases (~16-19s each), green on 3 consecutive runs — inline asserts the sandbox banner, RC order summary, processing-or-success race, and /success/ navigation; overlay completes through Paddle's own frame.

Two follow-ups:

  1. The paddle_e2e_test offering's products grant no entitlement, so the entitlement-gated success-page copy can't be asserted yet (the demo's WithEntitlement currently crashes on a null offering there — worth a dashboard fix + optionally a demo guard). The test stops at the verified /success/ navigation with a comment.
  2. Tests remain CI-skipped pending the WST-709 spike. Evidence so far is encouraging: rc-billing-checkout completes Paddle sandbox purchases in its CI.

Comment thread examples/webbilling-demo/src/tests/paddle/purchase-flow.test.ts Outdated
rogersole added a commit that referenced this pull request Jun 12, 2026
Addresses review feedback on #920: fold the near-identical inline and
overlay happy-path tests into a single forEach over the two modes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rogersole rogersole force-pushed the roger/wst-713-paddle-e2e-cancel-flows branch from 80f0169 to 6738fa0 Compare June 12, 2026 13:01
rogersole added a commit that referenced this pull request Jun 12, 2026
Addresses review feedback on #920: fold the near-identical inline and
overlay happy-path tests into a single forEach over the two modes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rogersole rogersole force-pushed the roger/wst-714-paddle-e2e-happy-paths branch from 3f3e271 to b6dca4b Compare June 12, 2026 13:02
rogersole and others added 5 commits June 12, 2026 15:03
…T-714)

- Inline: sandbox banner + RC order summary visible (presence only —
  exact totals depend on checkout.updated timing), form completion in
  the container-scoped frame, processing-or-success race, success page,
  Continue -> /success/.
- Overlay: form completion in Paddle's overlay frame, success page.

Both tests skip on CI until the WST-709 spike validates that Paddle
sandbox completes purchases from datacenter IPs (Stripe does not),
mirroring the Stripe suite's original LOCAL_ONLY_COMPLETION gating.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…xists (WST-714)

The Paddle E2E project's products grant no entitlement yet, so the
demo's entitlement-gated success page cannot render its content (it
currently crashes on a null offering in WithEntitlement). Reaching
/success/ already proves the purchase completed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… exists (WST-714)

The paddle_e2e_test offering's products now grant an entitlement, so
the success page renders its content like in the Stripe suite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The WST-709 spike (#923) confirmed Paddle sandbox completes purchases
from CircleCI IPs — both happy paths passed on CI — so the
local-only gating the Stripe suite needs is unnecessary here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses review feedback on #920: fold the near-identical inline and
overlay happy-path tests into a single forEach over the two modes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rogersole rogersole force-pushed the roger/wst-713-paddle-e2e-cancel-flows branch from 6738fa0 to 441db18 Compare June 12, 2026 13:03
@rogersole rogersole force-pushed the roger/wst-714-paddle-e2e-happy-paths branch from b6dca4b to ad6c5c9 Compare June 12, 2026 13:03
@rogersole

Copy link
Copy Markdown
Contributor Author

Superseded by #925, which now targets main and contains the full WST-564 stack (this PR's commits included) — all CI checks green there. Closing to keep a single merge point.

@rogersole rogersole closed this Jun 12, 2026
@rogersole rogersole deleted the roger/wst-714-paddle-e2e-happy-paths branch June 12, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants