@@ -6,9 +6,10 @@ import path from 'path';
66import { expect } from '@playwright/test' ;
77
88import { test } from './fixtures' ;
9+
910import { waitForKernelReady } from './utils' ;
1011
11- test . use ( { autoGoto : false , viewport : { width : 524 , height : 800 } } ) ;
12+ test . use ( { autoGoto : false } ) ;
1213
1314test . describe ( 'Mobile' , ( ) => {
1415 test ( 'The layout should be more compact on the file browser page' , async ( {
@@ -17,6 +18,11 @@ test.describe('Mobile', () => {
1718 } ) => {
1819 await page . goto ( `tree/${ tmpPath } ` ) ;
1920 await page . waitForSelector ( '#top-panel-wrapper' , { state : 'hidden' } ) ;
21+
22+ // temporary workaround to trigger a toolbar resize
23+ // TODO: investigate in https://github.com/jupyter/notebook/issues/6553
24+ await page . setViewportSize ( { width : 524 , height : 800 } ) ;
25+
2026 expect ( await page . screenshot ( ) ) . toMatchSnapshot ( 'tree.png' ) ;
2127 } ) ;
2228
@@ -30,12 +36,14 @@ test.describe('Mobile', () => {
3036 `${ tmpPath } /${ notebook } `
3137 ) ;
3238 await page . goto ( `notebooks/${ tmpPath } /${ notebook } ` ) ;
33- // TODO: investigate why this does not run the cells in Jupyter Notebook
34- // await page.notebook.run();
3539
3640 // wait for the kernel status animations to be finished
3741 await waitForKernelReady ( page ) ;
3842
43+ // temporary workaround to trigger a toolbar resize
44+ // TODO: investigate in https://github.com/jupyter/notebook/issues/6553
45+ await page . setViewportSize ( { width : 524 , height : 800 } ) ;
46+
3947 // force switching back to command mode to avoid capturing the cursor in the screenshot
4048 await page . evaluate ( async ( ) => {
4149 await window . jupyterapp . commands . execute ( 'notebook:enter-command-mode' ) ;
0 commit comments