Skip to content

057 — should buy monthly subscription and block adding users above seat limit

Description

Verifies that after buying a monthly subscription with 3 seats, the tenant can invite up to 3 users in total, but a 4th invitation is blocked with a "not enough licences" message.

Preconditions

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

Steps

  1. Open the Billing page. Expected: trial summary shows the 14-day free trial.
  2. Buy the Monthly plan via Stripe Hosted Checkout (1 seat). Expected: active Monthly subscription with 1 seat at $16.00, 1 of 1 used, summary sentence and next-payment date match Stripe.
  3. Open the Customer Portal via "Purchase more licences" and grow the plan to 3 seats. Expected: Monthly subscription shows 3 seats at $48.00, 1 of 3 used, summary and period-end date match Stripe.
  4. Invite a second user from the Users page. Expected: "User created" popup; Users list shows 2 users. Billing now shows 2 of 3 seats used at $48.00.
  5. Invite a third user. Expected: Users list shows 3 users. Billing shows 3 of 3 seats used at $48.00, summary and period-end date unchanged.
  6. Attempt to invite a fourth user. Expected: the "not enough licences" warning blocks the creation, no user is added, and the Users list still shows 3 users.
  • Spec: playwright/tests/integration/billing.spec.ts (line 163)
  • Spec: playwright/tests/integration/billing.spec.ts (line 163)