File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { test , expect } from '@playwright/test' ;
22import { 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+
412test ( '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 ) ;
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import { Locator, Page } from '@playwright/test';
22import { StoryBookPage } from '../storybookPage' ;
33
44export 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' ) ;
You can’t perform that action at this time.
0 commit comments