mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
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:
+23
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user