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 <noreply@anthropic.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user