Skip to content

Commit cc181b0

Browse files
author
Nina Benite
committed
Menu: add basic menu without title test
1 parent 873e770 commit cc181b0

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

test/e2e/menu/menu.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
import { test, expect } from '@playwright/test';
22
import { MenuPage } from './menuPage';
33

4+
test('Menu - basic without title', async ({ page }) => {
5+
const menuPage = new MenuPage(page);
6+
await menuPage.goto('args=title:');
7+
await expect(menuPage.canvas).toHaveScreenshot(
8+
'menu-basic-without-title.png'
9+
);
10+
});
11+
412
test('Menu - basic with disabled option', async ({ page }) => {
513
const menuPage = new MenuPage(page);
614
await menuPage.goto();
15+
await menuPage.options.first().waitFor();
716
await expect(menuPage.canvas).toHaveScreenshot(
817
'menu-basic-with-disabled-option.png'
918
);
16 KB
Loading

test/e2e/menu/menuPage.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import { Locator, Page } from '@playwright/test';
22
import { StoryBookPage } from '../storybookPage';
33

44
export class MenuPage extends StoryBookPage {
5-
readonly menuActivator: Locator;
65
readonly options: Locator;
7-
readonly pendingOption: Locator;
86

97
constructor(page: Page) {
108
super(page, '?path=/story/next-menu--basic');

0 commit comments

Comments
 (0)