Skip to content

064 — should cancel both monthly and yearly subscriptions

Description

Verifies that a tenant can cancel both Monthly and Yearly subscriptions, and once enough time passes for both periods to end, the app shows the convert-to-paid banner and offers to renew either plan.

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

  1. Open the Billing page. Expected: 14-day trial summary visible.
  2. Buy the Monthly plan (1 seat) and then the Yearly plan (1 seat) via Hosted Checkout.
  3. Expected: Monthly shows 1 seat at $16.00 and Yearly shows 1 seat at ~$142.77, both with next-payment dates from Stripe; aggregate usage is 1 of 2.
  4. Open the Customer Portal and cancel the Monthly subscription, then return to the app. Expected: Monthly card shows "subscription ends ..." with date from Stripe.
  5. Open the Customer Portal again and cancel the Yearly subscription, then return to the app. Expected: Yearly card also shows "subscription ends ..." with date from Stripe.
  6. Advance the Stripe test clock by 366 days (covers both periods) and reload.
  7. Expected: the convert-to-paid prompt and banner appear at the top of the Billing page, and both the Monthly and Yearly cards show a "Renew subscription" action.
  • Spec: playwright/tests/integration/billing.spec.ts (line 487)
  • Spec: playwright/tests/integration/billing.spec.ts (line 487)