Skip to content

Commit 708928b

Browse files
committed
Try resize workaround in tests for now
Fix order of selectors
1 parent b893cf0 commit 708928b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

ui-tests/test/mobile.spec.ts

+12-3
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,24 @@ import path from 'path';
66
import { expect } from '@playwright/test';
77

88
import { test } from './fixtures';
9+
910
import { waitForKernelReady } from './utils';
1011

11-
test.use({ autoGoto: false, viewport: { width: 524, height: 800 } });
12+
test.use({ autoGoto: false });
1213

1314
test.describe('Mobile', () => {
1415
test('The layout should be more compact on the file browser page', async ({
1516
page,
1617
tmpPath
1718
}) => {
1819
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+
1925
await page.waitForSelector('#top-panel-wrapper', { state: 'hidden' });
26+
2027
expect(await page.screenshot()).toMatchSnapshot('tree.png');
2128
});
2229

@@ -30,12 +37,14 @@ test.describe('Mobile', () => {
3037
`${tmpPath}/${notebook}`
3138
);
3239
await page.goto(`notebooks/${tmpPath}/${notebook}`);
33-
// TODO: investigate why this does not run the cells in Jupyter Notebook
34-
// await page.notebook.run();
3540

3641
// wait for the kernel status animations to be finished
3742
await waitForKernelReady(page);
3843

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+
3948
// force switching back to command mode to avoid capturing the cursor in the screenshot
4049
await page.evaluate(async () => {
4150
await window.jupyterapp.commands.execute('notebook:enter-command-mode');

0 commit comments

Comments
 (0)