Skip to content

Commit

Permalink
Add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Apr 25, 2024
1 parent ab6c04d commit e5a02be
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions ui-tests/tests/jupyterlab_new_launcher.spec.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
import { expect, test } from '@jupyterlab/galata';

Check failure on line 1 in ui-tests/tests/jupyterlab_new_launcher.spec.ts

View workflow job for this annotation

GitHub Actions / Integration tests

tests/jupyterlab_new_launcher.spec.ts:3:5 › should render new launcher

1) tests/jupyterlab_new_launcher.spec.ts:3:5 › should render new launcher ──────────────────────── Test timeout of 60000ms exceeded.

/**
* Don't load JupyterLab webpage before running the tests.
* This is required to ensure we capture all log messages.
*/
test.use({ autoGoto: false });

test('should emit an activation console message', async ({ page }) => {
const logs: string[] = [];

page.on('console', message => {
logs.push(message.text());
});

await page.goto();

expect(
logs.filter(
s => s === 'JupyterLab extension jupyterlab-new-launcher is activated!'
)
).toHaveLength(1);
test('should render new launcher', async ({ page }) => {
const launcher = page.locator('jp-LauncherBody');
expect(await launcher.screenshot()).toMatchSnapshot('launcher.png');

Check failure on line 5 in ui-tests/tests/jupyterlab_new_launcher.spec.ts

View workflow job for this annotation

GitHub Actions / Integration tests

tests/jupyterlab_new_launcher.spec.ts:3:5 › should render new launcher

1) tests/jupyterlab_new_launcher.spec.ts:3:5 › should render new launcher ──────────────────────── Error: locator.screenshot: Test timeout of 60000ms exceeded. Call log: - waiting for locator('jp-LauncherBody') 3 | test('should render new launcher', async ({ page }) => { 4 | const launcher = page.locator('jp-LauncherBody'); > 5 | expect(await launcher.screenshot()).toMatchSnapshot('launcher.png'); | ^ 6 | }); 7 | at /home/runner/work/jupyterlab-new-launcher/jupyterlab-new-launcher/ui-tests/tests/jupyterlab_new_launcher.spec.ts:5:25
});

0 comments on commit e5a02be

Please sign in to comment.