Comprehensive checkout + Stripe payment flow tests #75

Merged
will.anderson merged 1 commits from feat/checkout-comprehensive-tests into dev 2026-05-11 06:19:22 +00:00
Owner

Two new Playwright test files:

checkout-flows.spec.ts (60 tests): all 3 plan variants, auth section visibility, form validation, mocked Supabase auth flows (sign-up, confirm-required, existing session, sign-in error), DOM transitions, auth badge, buyer-email pre-fill, /api/supabase-config CORS.

checkout-stripe.spec.ts (45 tests): Stripe.js presence, NEURON_CFG shape, attestation checkbox, charge timing radios, setup_mode label, mocked Stripe via addInitScript + /api/payment-intent intercept, decline handling, sold-out guard, endpoint contracts, live test-card flows (skipped unless STRIPE_LIVE=1).

Two new Playwright test files: **checkout-flows.spec.ts** (60 tests): all 3 plan variants, auth section visibility, form validation, mocked Supabase auth flows (sign-up, confirm-required, existing session, sign-in error), DOM transitions, auth badge, buyer-email pre-fill, /api/supabase-config CORS. **checkout-stripe.spec.ts** (45 tests): Stripe.js presence, NEURON_CFG shape, attestation checkbox, charge timing radios, setup_mode label, mocked Stripe via addInitScript + /api/payment-intent intercept, decline handling, sold-out guard, endpoint contracts, live test-card flows (skipped unless STRIPE_LIVE=1).
will.anderson added 1 commit 2026-05-11 06:19:14 +00:00
- checkout-flows.spec.ts: 60 tests covering all 3 plan variants (free/
  professional/founding), auth section visibility, form validation,
  sign-in/sign-up toggle, mocked Supabase auth flows (sign-up, email-
  confirm-required, existing session, sign-in error), DOM transitions
  (auth-section → payment-section, free-success panel), auth badge
  content + email pre-fill, /api/checkout and /api/supabase-config
  endpoint contracts, CORS enforcement

- checkout-stripe.spec.ts: 45 tests covering Stripe.js presence,
  NEURON_CFG shape, submit-btn disabled state, founding attestation
  checkbox + attest-warn guard, professional charge timing radios,
  setup_mode label, mocked full Stripe payment flow via addInitScript +
  /api/payment-intent intercept, submit validation (name/email),
  decline handling, sold-out guard, /api/payment-intent /api/link-
  customer /api/attest /api/founding-count endpoint contracts, and
  live test-card flows (skipped unless STRIPE_LIVE=1)

Mocking strategy: page.route() for /api/supabase-config + Supabase
auth endpoints; addInitScript() for window.Stripe mock; localStorage
pre-seeding for existing-session tests.
will.anderson merged commit c0e6b40a5a into dev 2026-05-11 06:19:22 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron-web#75