Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6a6532f
feat(account-ui): export CheckoutTermsNote from the checkout entry
dante01yoon Sep 28, 2026
6332692
feat(billing-web): full-page checkout shell, eyebrow and capture skel…
dante01yoon Sep 28, 2026
c20abff
test(billing-web): cover the full-page checkout eyebrow, Pay readines…
dante01yoon Sep 28, 2026
18303c9
refactor(billing-web): extract the full-page checkout's subscribe req…
dante01yoon Sep 29, 2026
7a41f16
feat(billing-web): fall back to Plan & Credits settings when the chec…
dante01yoon Sep 28, 2026
febf810
FE-3018 feat(billing-web): saved-method tabs and payment form failure…
dante01yoon Sep 29, 2026
d1a4359
test(billing-web): release a collided Pay re-read as parked on a card…
dante01yoon Sep 29, 2026
5a8a7b4
fix(billing-web): release a collided Pay when the re-read finds the o…
dante01yoon Sep 29, 2026
4e01976
fix(billing-web): key ledger rows by position so held discounts shari…
dante01yoon Sep 29, 2026
d3dfec7
test(billing-web): the checkout return URL reads back as the same req…
dante01yoon Sep 29, 2026
da07c1f
fix(billing-web): keep the promo prefill on the checkout return URL
dante01yoon Sep 29, 2026
e37507e
test(billing-web): a checkout with no Stripe key says it could not lo…
dante01yoon Sep 29, 2026
2c0d3a1
fix(billing-web): end a checkout with no Stripe key on the couldn't-l…
dante01yoon Sep 29, 2026
b7562ab
FE-3018 fix(billing-web): checkout entry, refusal copy, Pay refusal a…
dante01yoon Sep 29, 2026
d4356b9
FE-3019 fix(billing-web): summary discounts, kept team commitment, an…
dante01yoon Sep 29, 2026
92e7d8a
FE-3020 fix(billing-web): price an unapplied promo on Pay, keep links…
dante01yoon Sep 29, 2026
cff42e3
FE-3021 fix(billing-web): ending screens and error-card buttons from …
dante01yoon Sep 29, 2026
4f5d6f8
FE-3022 fix(billing-web): payment authentication follow-ups from the …
dante01yoon Sep 29, 2026
02ef490
Merge remote-tracking branch 'origin/main' into HEAD
dante01yoon Sep 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions apps/billing-web/e2e/checkout-ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ test('with the flag on full_page, checkout is the full-page checkout', async ({
request.authorization === 'Bearer e2e-workspace-jwt'
)
).toBe(true)
expect(
cloud.requests.some(
(request) => request.path === '/billing/preview-subscribe'
)
).toBe(false)
})

test('when the flag read fails, checkout falls back to the embedded checkout', async ({
Expand Down
5 changes: 5 additions & 0 deletions apps/billing-web/e2e/fixtures/scenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export function pendingOperation(id: string): BillingOpStatusResponse {
return { id, status: 'pending', started_at: new Date().toISOString() }
}

/** In flight past the bank's challenge: the charge can no longer be called back. */
export function processingOperation(id: string): BillingOpStatusResponse {
return { ...pendingOperation(id), authentication_state: 'processing' }
}

export function declinedOperation(id: string): BillingOpStatusResponse {
const now = new Date().toISOString()
return {
Expand Down
57 changes: 51 additions & 6 deletions apps/billing-web/e2e/fixtures/stripe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* A fake `js.stripe.com` at the network boundary: enough of `window.Stripe`
* for `StripePaymentForm` and the embedded-challenge port to run their real
* code against, without a request ever reaching Stripe. Elements are inert
* (`mount`/`on`/`destroy` no-ops); `createConfirmationToken` and
* `handleNextAction` always succeed, which is all the current specs need —
* apart from reporting `ready` on the next task; `createConfirmationToken`
* and `handleNextAction` always succeed, which is all the current specs need —
* a decline or a timeout is modelled on the mocked Cloud's operation, not
* on the payment provider.
*
Expand All @@ -22,28 +22,73 @@ const FAKE_STRIPE_JS = `
// can tell "called correctly" from "called with the wrong secret".
nextActionCalls: []
}
function fakeElement() {
return { mount() {}, unmount() {}, destroy() {}, on() {} }
// A spec sets window.__e2eStripeLoadErrors before load to make that many
// payment elements report loaderror instead of ready.
function fakeElement(kind) {
const failing = kind === 'payment' && (window.__e2eStripeLoadErrors ?? 0) > 0
if (failing) window.__e2eStripeLoadErrors -= 1
return {
mount() {},
unmount() {},
destroy() {},
on(event, handler) {
if (event === (failing ? 'loaderror' : 'ready'))
setTimeout(() => handler({ error: { code: 'e2e_load_error' } }))
}
}
}
function fakeElements() {
return {
create: () => fakeElement(),
create: (kind) => fakeElement(kind),
update: () => Promise.resolve(),
submit: () => Promise.resolve({})
}
}
window.Stripe = function fakeStripeFactory() {
return {
elements: () => fakeElements(),
// A spec sets window.__e2eStripeMethodType before load to mint a
// token for a redirect method such as alipay instead of a card.
createConfirmationToken: () => {
window.__e2eFakeStripe.confirmationTokens += 1
return Promise.resolve({
confirmationToken: { id: 'ctok_e2e_fake' }
confirmationToken: {
id: 'ctok_e2e_fake',
payment_method_preview: {
type: window.__e2eStripeMethodType ?? 'card'
}
}
})
},
// The intent's next step as Stripe reports it: an in-page challenge,
// or the redirect a method such as Alipay finishes on.
retrievePaymentIntent: () =>
Promise.resolve({
paymentIntent: {
status: 'requires_action',
next_action: {
type: window.__e2eStripeRedirectTo
? 'alipay_handle_redirect'
: 'use_stripe_sdk'
}
}
}),
// A spec sets window.__e2eStripeRedirectTo before load to make the
// challenge leave the page the way a redirect method does, or
// window.__e2eStripeHoldNextAction to keep it open until the spec
// settles it through window.__e2eFakeStripe.releaseNextAction.
handleNextAction: (args) => {
window.__e2eFakeStripe.nextActions += 1
window.__e2eFakeStripe.nextActionCalls.push(args)
if (window.__e2eStripeRedirectTo) {
window.location.assign(window.__e2eStripeRedirectTo)
return new Promise(() => {})
}
if (window.__e2eStripeHoldNextAction) {
return new Promise((resolve) => {
window.__e2eFakeStripe.releaseNextAction = resolve
})
}
return Promise.resolve({ paymentIntent: { status: 'succeeded' } })
}
}
Expand Down
Loading
Loading