Skip to content

Commit

Permalink
fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jul 12, 2022
1 parent d374d6f commit 4e71fdc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 42 deletions.
2 changes: 1 addition & 1 deletion test/e2e-website/material-docs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test.describe('Material docs', () => {
test('should have correct link for API section', async ({ page }) => {
await page.goto(`/material-ui/react-card/`);

const anchors = page.locator('div > h2#heading-api ~ ul a');
const anchors = page.locator('div > h2#api ~ ul a');

const firstAnchor = anchors.first();
const textContent = await firstAnchor.textContent();
Expand Down
10 changes: 4 additions & 6 deletions test/e2e-website/products-drawer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ test('able to navigate between products', async ({ page }) => {
await expect(page.locator('#mui-product-menu')).toBeVisible();

await expect(
page.locator('#mui-product-menu a[href="/material-ui/getting-started/installation/"]'),
page.locator('#mui-product-menu a[href^="/material-ui/getting-started/"]'),
).toBeVisible();

await expect(page.locator('#mui-product-menu a[href="/system/basics/"]')).toHaveAttribute(
await expect(page.locator('#mui-product-menu a[href^="/system/"]')).toHaveAttribute(
'href',
'/system/basics/',
);

await expect(page.locator('#mui-product-menu a[href="/x/introduction/"]')).toBeVisible();
await expect(page.locator('#mui-product-menu a[href^="/x/introduction/"]')).toBeVisible();

await expect(
page.locator('#mui-product-menu a[href="/base/getting-started/installation/"]'),
).toBeVisible();
await expect(page.locator('#mui-product-menu a[href^="/base/getting-started/"]')).toBeVisible();
});
35 changes: 0 additions & 35 deletions test/e2e-website/x-redirects.spec.ts

This file was deleted.

0 comments on commit 4e71fdc

Please sign in to comment.