File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const MENU_PATHS = [
25
25
test . use ( { autoGoto : false } ) ;
26
26
27
27
test . describe ( 'Notebook Menus' , ( ) => {
28
- test . beforeEach ( async ( { page, tmpPath } ) => {
28
+ test . beforeAll ( async ( { page, tmpPath } ) => {
29
29
await page . contents . uploadFile (
30
30
path . resolve ( __dirname , `./notebooks/${ NOTEBOOK } ` ) ,
31
31
`${ tmpPath } /${ NOTEBOOK } `
@@ -40,7 +40,8 @@ test.describe('Notebook Menus', () => {
40
40
41
41
const imageName = `opened-menu-${ menuPath . replace ( / > / g, '-' ) } .png` ;
42
42
const menu = await page . menu . getOpenMenu ( ) ;
43
- expect ( await menu . screenshot ( ) ) . toMatchSnapshot ( imageName . toLowerCase ( ) ) ;
43
+ expect ( menu ) . toBeDefined ( ) ;
44
+ expect ( await menu ! . screenshot ( ) ) . toMatchSnapshot ( imageName . toLowerCase ( ) ) ;
44
45
} ) ;
45
46
} ) ;
46
47
} ) ;
You can’t perform that action at this time.
0 commit comments