Skip to content

Commit 4161af7

Browse files
committed
fix: use first() selector for pagination button to handle multiple matches
1 parent b8708bc commit 4161af7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/breweries.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ test.describe('Breweries Listing', () => {
101101
await expect(prev).toBeEnabled();
102102

103103
// Navigate back to page 1 via numeric button
104-
await page.getByRole('button', { name: '1' }).click();
104+
await page.getByRole('button', { name: '1' }).first().click();
105105
await expect(page).toHaveURL(/page=1(\D|$)/);
106106
});
107107

0 commit comments

Comments
 (0)