will.anderson
61f006f62d
Fix CI JS corruption from obfuscator stdout; clean up flaky test guards
...
Dev — Build & local smoke test / build-smoke (pull_request) Successful in 1m54s
- Strip [javascript-obfuscator-cli] progress line from elc --obfuscate
output before writing to dist/js/ (was prepended to every compiled JS
file, causing browser parse errors on stage)
- Remove spurious waitForFunction(signUpWithEmail) guards from
buyer-name and buyer-email structural tests (pure DOM tests, no auth)
- Switch chat.spec.ts beforeEach to domcontentloaded (SSR elements
present at DOM ready; networkidle caused cold-start timeouts)
2026-05-11 08:19:30 -05:00
will.anderson
dbb8035698
Add comprehensive checkout + Stripe payment flow tests
...
- 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.
2026-05-11 01:18:37 -05:00