069 — should cancel yearly subscription and revoke access after period ends¶
Description¶
Verifies the cancel-then-period-end behaviour for a Yearly subscription: cancellation keeps access active until the period ends, then once the cycle is over the plan goes inactive, the convert-to-paid banner returns, and every user is downgraded to "View only".
Preconditions¶
- Freshly registered tenant signed in as the owner on the dev environment.
- Tenant is on the 14-day free trial.
- Stripe sandbox customer + test clock exist for the tenant.
Steps¶
- Open the Billing page. Expected: 14-day trial summary visible.
- Buy the Yearly plan via Hosted Checkout (1 seat). Expected: Yearly active, 1 seat at ~$142.77, 1 of 1 used, summary and next-payment date match Stripe.
- Open the Customer Portal and grow Yearly to 2 seats. Add 1 employee via API and reload. Expected: Yearly subscription shows 2 seats at ~$285.54, 2 of 2 used, summary and next-payment date match Stripe.
- Open the Customer Portal again and cancel the Yearly subscription, then return to the app. Expected: Yearly subscription still shows 2 seats and 2 of 2 used, but the summary sentence now reads "subscription ends ..." with a date matching Stripe's period end, and the displayed cost drops to ~$142.77 (the original first-invoice amount, since the upgrade to 2 seats was prorated).
- Advance the Stripe test clock by 366 days and reload. Expected: the convert-to-paid prompt and banner are back at the top of the Billing page, and the Yearly card shows a "Renew Yearly subscription" action.
- Open the Users page. Expected: the owner and the previously-added employee are both shown as "View only" with no access, and the convert-to-paid prompt/banner is still visible.
Related¶
- Spec:
playwright/tests/integration/billing.spec.ts(line 756)
Related¶
- Spec:
playwright/tests/integration/billing.spec.ts(line 756)