diff --git a/apps/web/e2e/comments.spec.ts b/apps/web/e2e/comments.spec.ts index 5d8f98e..b71a9c1 100644 --- a/apps/web/e2e/comments.spec.ts +++ b/apps/web/e2e/comments.spec.ts @@ -13,29 +13,20 @@ const BASE_URL = process.env.E2E_BASE_URL ?? 'http://localhost:5173'; let pondId: string; let pageUrl: string; -let ownerId: string; // The pack provisions its OWN pond: the shared fixture pond accumulates // grants from earlier packs in the same CI job (access-rules & friends), so -// "fixture-editor is only a reader here" would not hold there. A Site Admin -// lifts fixture-user's additional-pond quota for the run. +// "fixture-editor is only a reader here" would not hold there. The seed +// already gives fixture users additional-pond headroom (override 100) — +// never lower it here: in CI the earlier packs' ponds count against it. test.beforeAll(async ({ browser }) => { - const admin = await contextForUser(browser, BASE_URL, 'fixture-admin'); - const lookup = (await (await admin.request.get('/api/v1/admin/users?q=fixture-user')).json()) as { - users: { id: string; username: string }[]; - }; - ownerId = lookup.users.find((u) => u.username === 'fixture-user')!.id; - const quota = await admin.request.put(`/api/v1/admin/quotas/user/${ownerId}/additional_ponds`, { - data: { value: 10 }, - }); - expect(quota.ok()).toBe(true); - await admin.close(); - const owner = await contextForUser(browser, BASE_URL, 'fixture-user'); const pondRes = await owner.request.post('/api/v1/ponds', { data: { name: `Comments stage ${Date.now()}` }, }); - expect(pondRes.ok()).toBe(true); + if (!pondRes.ok()) { + throw new Error(`create pond failed: ${pondRes.status()} ${await pondRes.text()}`); + } const pond = (await pondRes.json()) as { id: string; slug: string }; pondId = pond.id;