Skip to content

056 — should show convert-to-paid banner when trial expires

Description

Verifies that when the 14-day free trial expires the app shows a "convert to paid plan" banner and that the owner can immediately recover by buying a monthly subscription and adding more seats.

Preconditions

  • Freshly registered tenant signed in as the owner on the dev environment.
  • Tenant is on the default 14-day free trial.
  • Stripe sandbox customer + test clock exist for the tenant.

Steps

  1. Open the Billing page. Expected: trial summary shows the 14-day free trial with 1 seat used.
  2. Trigger the backend's "expire trial" test endpoint for this tenant and reload the page. Expected: the page now shows the "convert to paid plan" prompt at the top, a banner across the page, and the message that no licences are available.
  3. Click "Buy monthly plan" and complete the Stripe Hosted Checkout with the test card. Expected: Billing now shows an active Monthly subscription, 1 seat at $16.00/seat, with the next-payment date and summary line matching Stripe's current period end (1 of 1 seat used).
  4. Click "Purchase more licences" and walk through the Stripe Customer Portal to grow the monthly plan to 2 seats. Expected: Billing shows the Monthly subscription with 2 seats at $32.00, 1 of 2 seats used, summary sentence and period-end date matching Stripe.
  • Spec: playwright/tests/integration/billing.spec.ts (line 124)
  • Spec: playwright/tests/integration/billing.spec.ts (line 124)