Skip to content

Commit ac9d255

Browse files
committed
Update search test
1 parent c80b2f6 commit ac9d255

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

e2e/specs/skeleton/search.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ test.describe('Search', () => {
119119
page.getByRole('heading', {level: 2, name: 'Articles'}),
120120
).toBeVisible();
121121

122+
// Scope to the Articles section to avoid matching nav links like /blogs/journal
122123
const articleLink = page
124+
.getByRole('heading', {level: 2, name: 'Articles'})
125+
.locator('..')
123126
.getByRole('link')
124-
.and(page.locator('[href*="/blogs/"]'))
125127
.first();
126128

127129
await expect(articleLink).toBeVisible();

0 commit comments

Comments
 (0)