@@ -6,9 +6,10 @@ import path from 'path';
6
6
import { expect } from '@playwright/test' ;
7
7
8
8
import { test } from './fixtures' ;
9
+
9
10
import { waitForKernelReady } from './utils' ;
10
11
11
- test . use ( { autoGoto : false , viewport : { width : 524 , height : 800 } } ) ;
12
+ test . use ( { autoGoto : false } ) ;
12
13
13
14
test . describe ( 'Mobile' , ( ) => {
14
15
test ( 'The layout should be more compact on the file browser page' , async ( {
@@ -17,6 +18,11 @@ test.describe('Mobile', () => {
17
18
} ) => {
18
19
await page . goto ( `tree/${ tmpPath } ` ) ;
19
20
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
+
20
26
expect ( await page . screenshot ( ) ) . toMatchSnapshot ( 'tree.png' ) ;
21
27
} ) ;
22
28
@@ -30,12 +36,14 @@ test.describe('Mobile', () => {
30
36
`${ tmpPath } /${ notebook } `
31
37
) ;
32
38
await page . goto ( `notebooks/${ tmpPath } /${ notebook } ` ) ;
33
- // TODO: investigate why this does not run the cells in Jupyter Notebook
34
- // await page.notebook.run();
35
39
36
40
// wait for the kernel status animations to be finished
37
41
await waitForKernelReady ( page ) ;
38
42
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
+
39
47
// force switching back to command mode to avoid capturing the cursor in the screenshot
40
48
await page . evaluate ( async ( ) => {
41
49
await window . jupyterapp . commands . execute ( 'notebook:enter-command-mode' ) ;
0 commit comments