@@ -6,17 +6,24 @@ 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 ( {
15
16
page,
16
17
tmpPath
17
18
} ) => {
18
19
await page . goto ( `tree/${ tmpPath } ` ) ;
20
+
21
+ // temporary workaround to trigger a toolbar resize
22
+ // TODO: investigate in https://github.com/jupyter/notebook/issues/6553
23
+ await page . setViewportSize ( { width : 524 , height : 800 } ) ;
24
+
19
25
await page . waitForSelector ( '#top-panel-wrapper' , { state : 'hidden' } ) ;
26
+
20
27
expect ( await page . screenshot ( ) ) . toMatchSnapshot ( 'tree.png' ) ;
21
28
} ) ;
22
29
@@ -30,12 +37,14 @@ test.describe('Mobile', () => {
30
37
`${ tmpPath } /${ notebook } `
31
38
) ;
32
39
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
40
36
41
// wait for the kernel status animations to be finished
37
42
await waitForKernelReady ( page ) ;
38
43
44
+ // temporary workaround to trigger a toolbar resize
45
+ // TODO: investigate in https://github.com/jupyter/notebook/issues/6553
46
+ await page . setViewportSize ( { width : 524 , height : 800 } ) ;
47
+
39
48
// force switching back to command mode to avoid capturing the cursor in the screenshot
40
49
await page . evaluate ( async ( ) => {
41
50
await window . jupyterapp . commands . execute ( 'notebook:enter-command-mode' ) ;
0 commit comments