Skip to content

Commit e14ead1

Browse files
raifdmuellerclaude
andcommitted
fix: update E2E tests for new navigation (Anchors + More dropdown)
- "Catalog" → "Anchors" in nav text assertion - About/Contributing tests now open More dropdown first - "navigate back to Catalog" → "navigate back to Anchors" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cab0441 commit e14ead1

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

website/tests/e2e/website.spec.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test.describe('Homepage - Card Grid', () => {
2424
await expect(page.locator('#lang-toggle')).toHaveText('DE')
2525

2626
// Check navigation links (use .first() to select desktop nav, not mobile)
27-
await expect(page.locator('a[data-route="/"]').first()).toContainText('Catalog')
27+
await expect(page.locator('a[data-route="/"]').first()).toContainText('Anchors')
2828
await expect(page.locator('a[data-route="/about"]').first()).toContainText('About')
2929
await expect(page.locator('a[data-route="/contributing"]').first()).toContainText('Contributing')
3030
})
@@ -157,6 +157,8 @@ test.describe('Homepage - Card Grid', () => {
157157
})
158158

159159
test('should display action links', async ({ page }) => {
160+
// About link is in the More dropdown — open it first
161+
await page.locator('#more-menu-toggle').click()
160162
const aboutLink = page.locator('a[href="#/about"]').first()
161163
await expect(aboutLink).toBeVisible()
162164

@@ -223,7 +225,8 @@ test.describe('Routing - Documentation Pages', () => {
223225
})
224226

225227
test('should navigate to About page', async ({ page }) => {
226-
// Click About link (use first for desktop nav)
228+
// About is in the More dropdown — open it first
229+
await page.locator('#more-menu-toggle').click()
227230
await page.locator('a[data-route="/about"]').first().click()
228231

229232
// URL should update
@@ -239,7 +242,8 @@ test.describe('Routing - Documentation Pages', () => {
239242
})
240243

241244
test('should navigate to Contributing page', async ({ page }) => {
242-
// Click Contributing link (use first for desktop nav)
245+
// Contributing is in the More dropdown — open it first
246+
await page.locator('#more-menu-toggle').click()
243247
await page.locator('a[data-route="/contributing"]').first().click()
244248

245249
// URL should update
@@ -254,11 +258,12 @@ test.describe('Routing - Documentation Pages', () => {
254258
await expect(contributingLink).toHaveClass(/font-semibold/)
255259
})
256260

257-
test('should navigate back to Catalog from About', async ({ page }) => {
258-
// Go to About (use first for desktop nav)
261+
test('should navigate back to Anchors from About', async ({ page }) => {
262+
// Go to About via More dropdown
263+
await page.locator('#more-menu-toggle').click()
259264
await page.locator('a[data-route="/about"]').first().click()
260265

261-
// Go back to Catalog
266+
// Go back to Anchors
262267
await page.locator('a[data-route="/"]').first().click()
263268

264269
// URL should be home
@@ -267,9 +272,9 @@ test.describe('Routing - Documentation Pages', () => {
267272
// Card grid should be visible
268273
await expect(page.locator('.anchor-card').first()).toBeVisible()
269274

270-
// Catalog link should be highlighted (use .first() to select desktop nav)
271-
const catalogLink = page.locator('a[data-route="/"]').first()
272-
await expect(catalogLink).toHaveClass(/font-semibold/)
275+
// Anchors link should be highlighted (use .first() to select desktop nav)
276+
const anchorsLink = page.locator('a[data-route="/"]').first()
277+
await expect(anchorsLink).toHaveClass(/font-semibold/)
273278
})
274279

275280
test('should handle direct URL to About page', async ({ page }) => {
@@ -282,7 +287,8 @@ test.describe('Routing - Documentation Pages', () => {
282287
})
283288

284289
test('should handle browser back button', async ({ page }) => {
285-
// Navigate to About (use first for desktop nav)
290+
// Navigate to About via More dropdown
291+
await page.locator('#more-menu-toggle').click()
286292
await page.locator('a[data-route="/about"]').first().click()
287293

288294
// Go back

0 commit comments

Comments
 (0)