Merge pull request #35470 from overleaf/td-stripe-display-past-due

Display subscription for past-due Stripe subscription

GitOrigin-RevId: eb37e56676d15596ae23c0ff3261db89d93d41f3
This commit is contained in:
Tim Down
2026-09-17 11:27:45 +00:00
committed by Copybot
parent 0ec741ad76
commit 61ef838424
4 changed files with 76 additions and 3 deletions
@@ -11,6 +11,7 @@ import {
annualActiveSubscription,
canceledSubscription,
customSubscription,
pastDueActiveSubscription,
pastDueExpiredSubscription,
} from '../../fixtures/subscriptions'
import {
@@ -154,6 +155,17 @@ describe('<PersonalSubscription />', function () {
screen.getByRole('button', { name: 'Reactivate your subscription' })
})
it('renders the active dash for a past-due Stripe subscription', function () {
renderWithSubscriptionDashContext(<PersonalSubscription />, {
metaTags: [
{ name: 'ol-subscription', value: pastDueActiveSubscription },
],
})
screen.getByRole('heading', { name: /billing/i })
screen.getByRole('button', { name: 'Cancel your subscription' })
})
it('renders the expired dash', function () {
renderWithSubscriptionDashContext(<PersonalSubscription />, {
metaTags: [
@@ -195,6 +207,17 @@ describe('<PersonalSubscription />', function () {
})
expect(invoiceLinks.length).to.equal(2)
})
it('renders subscription details alongside the alert for a past-due Stripe subscription', function () {
renderWithSubscriptionDashContext(<PersonalSubscription />, {
metaTags: [
{ name: 'ol-subscription', value: pastDueActiveSubscription },
],
})
screen.getByRole('alert')
screen.getByRole('heading', { name: /billing/i })
screen.getByRole('button', { name: 'Cancel your subscription' })
})
})
describe('Recurly JS', function () {