Skip to content

059 — should auto-renew monthly subscription after 32 days

Description

Verifies that a Monthly subscription auto-renews after one billing cycle: simulating 32 days passing keeps the plan active, seats unchanged, and produces a new invoice in Stripe.

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 via Hosted Checkout (1 seat). Expected: Monthly active, 1 seat at $16.00, 1 of 1 used, summary and next-payment date match Stripe.
  3. Open the Customer Portal and grow Monthly to 2 seats. Add 1 employee via API and reload Billing. Expected: Monthly subscription shows 2 seats at $32.00, 2 of 2 used, summary and next-payment date match Stripe; Stripe shows 2 invoices for this customer.
  4. Advance the Stripe test clock by 32 days and reload Billing. Expected: the subscription has auto-renewed — Monthly subscription still shows 2 seats at $32.00, 2 of 2 used, but the summary sentence and next-payment date now reflect the new period end one month later (matches Stripe), and Stripe shows 3 invoices for this customer.
  • Spec: playwright/tests/integration/billing.spec.ts (line 291)
  • Spec: playwright/tests/integration/billing.spec.ts (line 291)