commit
457e292d4e
@ -1,6 +1,11 @@
|
||||
from tempfile import mkdtemp
|
||||
|
||||
c.ServerApp.port = 8888
|
||||
c.ServerApp.port_retries = 0
|
||||
c.ServerApp.open_browser = False
|
||||
|
||||
c.ServerApp.root_dir = mkdtemp(prefix="galata-test-")
|
||||
c.ServerApp.token = ""
|
||||
c.ServerApp.password = ""
|
||||
c.ServerApp.disable_check_xsrf = True
|
||||
c.ServerApp.open_browser = False
|
||||
c.RetroApp.expose_app_in_browser = True
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
// Copyright (c) Jupyter Development Team.
|
||||
// Distributed under the terms of the Modified BSD License.
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { test } from './fixtures';
|
||||
|
||||
test.use({ autoGoto: false, viewport: { width: 512, height: 768 } });
|
||||
|
||||
test.describe('Mobile', () => {
|
||||
test('The layout should be more compact on the file browser page', async ({
|
||||
page,
|
||||
tmpPath
|
||||
}) => {
|
||||
await page.goto(`tree/${tmpPath}`);
|
||||
await page.waitForSelector('#top-panel-wrapper', { state: 'hidden' });
|
||||
expect(await page.screenshot()).toMatchSnapshot('tree.png');
|
||||
});
|
||||
|
||||
test('The layout should be more compact on the notebook page', async ({
|
||||
page,
|
||||
tmpPath
|
||||
}) => {
|
||||
const notebook = 'empty.ipynb';
|
||||
await page.contents.uploadFile(
|
||||
path.resolve(__dirname, `./notebooks/${notebook}`),
|
||||
`${tmpPath}/${notebook}`
|
||||
);
|
||||
await page.goto(`notebooks/${tmpPath}/${notebook}`);
|
||||
// TODO: investigate why this does not run the cells in RetroLab
|
||||
// await page.notebook.run();
|
||||
|
||||
// wait for the kernel status animations to be finished
|
||||
await page.waitForSelector('.jp-RetroKernelStatus-fade');
|
||||
await page.waitForFunction(() => {
|
||||
const status = window.document.getElementsByClassName(
|
||||
'jp-RetroKernelStatus'
|
||||
)[0];
|
||||
|
||||
if (!status) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const finished = status?.getAnimations().reduce((prev, curr) => {
|
||||
return prev && curr.playState === 'finished';
|
||||
}, true);
|
||||
return finished;
|
||||
});
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot('notebook.png');
|
||||
});
|
||||
});
|
||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 20 KiB |
Loading…
Reference in new issue