Merge pull request #35836 from overleaf/rh-prices-split

[web] Update monthly plan prices for new subscriptions with split test

GitOrigin-RevId: 42d0adaf68647adc93f4c05d5ddeefb356753db2
This commit is contained in:
roo hutton
2026-09-17 11:49:04 +00:00
committed by Copybot
parent 2e1a313ccd
commit b886c0b266
18 changed files with 553 additions and 30 deletions
@@ -61,6 +61,37 @@ describe('<ChangePlanModal />', function () {
expect(screen.queryByText('loading', { exact: false })).to.be.null
})
it('shows the price of the assigned price version for Stripe subscriptions', async function () {
const stripeSubscription = {
...annualActiveSubscription,
service: 'stripe-us' as const,
}
// the backend resolves listPrice from the user's assigned price version;
// the Recurly stub prices this plan at $23.00
const plansWithListPrice = plans.map(plan => ({
...plan,
displayPrice: undefined,
...(plan.planCode === 'collaborator' ? { listPrice: 25 } : {}),
}))
renderWithSubscriptionDashContext(
<ActiveSubscription subscription={stripeSubscription} />,
{
metaTags: [
{ name: 'ol-plans', value: plansWithListPrice },
{ name: 'ol-groupPlans', value: groupPlans },
{ name: 'ol-subscription', value: stripeSubscription },
{ name: 'ol-recommendedCurrency', value: 'USD' },
],
}
)
fireEvent.click(screen.getByRole('button', { name: 'Change plan' }))
const priceCell = await screen.findByText('$25.00 / month')
const row = priceCell.closest('tr') as HTMLTableRowElement
within(row).getByText('Standard monthly')
})
it('renders "Your new plan" and "Keep current plan" when there is a pending plan change', async function () {
renderActiveSubscription(pendingSubscriptionChange)