Skip to content

Commit b0250ee

Browse files
authored
[docs] Use regex instead of specific url in e2e-website-tests (mui#4121)
1 parent ff35a77 commit b0250ee

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/e2e-website/data-grid-current.spec.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ test.describe('DataGrid docs', () => {
9494

9595
const anchor = await page.locator('.DocSearch-Hits a:has-text("Data Grid - Components")');
9696

97-
await expect(anchor.first()).toHaveAttribute(
98-
'href',
99-
`/components/data-grid/components/#main-content`,
100-
);
97+
await expect(anchor.first()).toHaveAttribute('href', /^\/components\/data-grid\//);
10198
});
10299

103100
test('should have correct link when searching API', async ({ page }) => {

0 commit comments

Comments
 (0)