Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a6717a6

Browse files
committedOct 6, 2022
Try resize workaround in tests for now
1 parent b893cf0 commit a6717a6

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed
 

‎ui-tests/test/mobile.spec.ts

+11-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ 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 ({
@@ -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

Comments
 (0)