All files / web/e2e tier.setup.ts

0% Statements 0/18
0% Branches 0/1
0% Functions 0/1
0% Lines 0/18

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                                     
/**
 * Playwright setup: ensure admin is on family tier.
 *
 * The admin user has many seed/test practice students. On free tier (limit 1),
 * any test that creates a player will fail. This setup step sets the admin to
 * family tier (unlimited students) so all tests can create players freely.
 *
 * Runs after auth.setup.ts (depends on storage state being ready).
 */

import { test as setup, expect } from '@playwright/test'

setup('set admin to family tier', async ({ request }) => {
  const res = await request.post('/api/debug/billing-set-tier', {
    data: { tier: 'family' },
  })
  expect(res.ok(), `Failed to set family tier: ${await res.text()}`).toBeTruthy()
})