Skip to content

Commit

Permalink
fix e2e-website test
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Apr 6, 2022
1 parent dce3bf1 commit ed6a466
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
12 changes: 3 additions & 9 deletions test/e2e-website/material-icons.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import { test as base, expect } from '@playwright/test';
import FEATURE_TOGGLE from 'docs/src/featureToggle';
import { TestFixture } from './playwright.config';

const test = base.extend<TestFixture>({});

test('should see the selected icon popup that match the query', async ({ page }) => {
await page.goto(
FEATURE_TOGGLE.enable_redirects
? '/material-ui/material-icons/?selected=AcUnit'
: '/components/material-icons/?selected=AcUnit',
{ waitUntil: 'networkidle' },
);
test.only('should see the selected icon popup that match the query', async ({ page }) => {
await page.goto('/material-ui/material-icons/?selected=AcUnit');

await expect(page.locator('h2:has-text("AcUnit")')).toBeVisible();
await expect(page.locator('.MuiDialog-container h2:has-text("AcUnit")')).toBeVisible();
});
4 changes: 1 addition & 3 deletions test/e2e-website/products-drawer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ test('able to navigate between products', async ({ page }) => {
'/system/basics/',
);

await expect(
page.locator('#mui-product-menu a[href="/x/react-data-grid/getting-started/"]'),
).toBeVisible();
await expect(page.locator('#mui-product-menu a[href="/x/advanced-components/"]')).toBeVisible();

if (FEATURE_TOGGLE.enable_mui_base_scope) {
await expect(
Expand Down

0 comments on commit ed6a466

Please sign in to comment.