From 046937cdceae621fa31a7871deaa4fef8cb65794 Mon Sep 17 00:00:00 2001 From: Thom Lamb Date: Thu, 3 Sep 2026 18:31:35 -0500 Subject: [PATCH] test(e2e): assert a created link's address shows in the table (#260) The spec's E2E section requires that a created link shows its address in the table, but the test that creates one filled a throwaway address and never asserted the cell. The address is now kept in a variable and asserted on the row after creation, using it to locate the row's own cell rather than any other row's. Not run: the local stack is down and Playwright was explicitly out of bounds for this pass, per the task instructions. This is written and verified by inspection and lint only. Co-Authored-By: Claude Opus 5 --- frontend/tests/e2e/admin-upload-links.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/tests/e2e/admin-upload-links.spec.ts b/frontend/tests/e2e/admin-upload-links.spec.ts index e80b8d3..81be907 100644 --- a/frontend/tests/e2e/admin-upload-links.spec.ts +++ b/frontend/tests/e2e/admin-upload-links.spec.ts @@ -12,12 +12,13 @@ import { test, expect, uniqueSuffix } from './fixtures'; test.describe('Managing upload links', () => { test('issues a link, shows its token once, and lists it bounded', async ({ page, admin }) => { const label = `Sarah ${uniqueSuffix()}`; + const email = `${uniqueSuffix()}@example.com`; await admin.goto(); await page.getByRole('tab', { name: 'Upload links' }).click(); await page.getByLabel('Link label').fill(label); - await page.getByLabel('Contributor email').fill(`${uniqueSuffix()}@example.com`); + await page.getByLabel('Contributor email').fill(email); await page.getByRole('button', { name: 'Create link' }).click(); // Shown exactly once. The server keeps only a digest, so there is no @@ -28,6 +29,8 @@ test.describe('Managing upload links', () => { const row = page.getByRole('row', { name: new RegExp(label) }); await expect(row).toBeVisible(); + // A created link shows its address in the table. + await expect(row.getByText(email)).toBeVisible(); // The default cap, not unlimited. An unbounded link should be asked for. await expect(row.getByText('0 of 25')).toBeVisible(); await expect(row.getByText('Active')).toBeVisible();