Skip to content

Commit 6700e61

Browse files
bloveclaude
andauthored
test(website): fix the e2e main broke, and drop the obsolete next-env wrapper (#870)
Two related repairs to the website e2e lane: 1. Docs search spec: #865's a11y pass gave search results role="option", and an explicit ARIA role overrides the implicit button role — so getByRole('button') stopped matching and main's website e2e has been red since. The spec now queries role 'option'. (Verified the failure reproduces identically on pristine main before touching anything.) 2. run-e2e-with-next-env-restore.ts existed to rewrite next-env.d.ts to canonical content after e2e, protecting a then-tracked file from dirty- tree churn. #862 untracked the file, and the dangling dev-path content the wrapper guarded against breaks nothing today — verified by writing that exact content with the referenced path absent: lint 0, test 0, build 0 (website has no typecheck target, and build regenerates the file first). The e2e target now runs the playwright executor directly; the wrapper and its extra target indirection are gone. Website e2e: 49/49 with the folded target. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 3bda04a commit 6700e61

3 files changed

Lines changed: 3 additions & 55 deletions

File tree

apps/website/e2e/docs.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ test.describe('Docs search', () => {
147147
const searchInput = page.locator('input[placeholder*="Search"], input[type="search"]').first();
148148
await searchInput.fill('choosing adapter');
149149

150-
await expect(page.getByRole('button', { name: /Choosing an adapter/i })).toBeVisible();
150+
// Search results are role="option" inside the listbox (a11y pass, #865) —
151+
// an explicit ARIA role overrides the implicit button role.
152+
await expect(page.getByRole('option', { name: /Choosing an adapter/i })).toBeVisible();
151153
await expect(page.getByText('No results found')).toHaveCount(0);
152154
});
153155
});

apps/website/project.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@
7070
}
7171
},
7272
"e2e": {
73-
"executor": "nx:run-commands",
74-
"options": {
75-
"command": "npx tsx apps/website/scripts/run-e2e-with-next-env-restore.ts -- npx nx run website:e2e-playwright --skip-nx-cache"
76-
}
77-
},
78-
"e2e-playwright": {
7973
"executor": "@nx/playwright:playwright",
8074
"options": {
8175
"config": "apps/website/playwright.config.ts"

apps/website/scripts/run-e2e-with-next-env-restore.ts

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)