Skip to content

066 — should buy yearly subscription and block adding users above seat limit

Description

Verifies that after buying a Yearly 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: 14-day trial summary visible.
  2. 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.
  3. Open the Customer Portal and grow Yearly to 3 seats. Expected: Yearly subscription shows 3 seats at ~$428.31, 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 shows 2 of 3 seats used at ~$428.31.
  5. Invite a third user. Expected: Users list shows 3 users. Billing shows 3 of 3 seats used at ~$428.31, 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 585)
  • Spec: playwright/tests/integration/billing.spec.ts (line 585)