123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import { test, expect } from '@playwright/test';
- test.beforeEach(async ({ page }) => {
- await page.goto('/');
- });
- test('Navigation drawer icon should open the drawer when clicked', async ({ page }) => {
-
- await expect(page.locator('text=Menu')).not.toBeVisible();
-
- await page.locator('[aria-label="Open Navigation Drawer"]').click();
-
- await expect(page.locator('text=Menu')).toBeVisible();
- });
- test('Feedback item should open in a new tab', async ({ page }) => {
-
- await page.locator('[aria-label="Open Navigation Drawer"]').click();
-
- await Promise.all([
- page.waitForEvent('popup'),
- page
- .locator(
- 'a:nth-child(11) .LinkContainer_anchor__bOj_o .NavigationDrawerItem_container__ZbHp6 .NavigationDrawerItem_innerContainer__KIZpr',
- )
- .click(),
- ]);
- });
- test('Navigation drawer close icon should close the drawer', async ({ page }) => {
-
- await page.locator('[aria-label="Open Navigation Drawer"]').click();
-
- await expect(page.locator('text=Menu')).toBeVisible();
-
- await page.locator('[aria-label="Close Drawer"]').first().click();
-
- await expect(page.locator('text=Menu')).not.toBeVisible();
- });
|