Skip to content

Commit

Permalink
Configure UI tests for Lite Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
arjxn-py committed Feb 13, 2025
1 parent a4a0599 commit 68b731c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions ui-tests/tests/lite.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { expect, test, galata } from '@jupyterlab/galata';

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree

1) tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree ───────────────────────────────── Test timeout of 60000ms exceeded.

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree

1) tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree ───────────────────────────────── Error: locator.isChecked: Target page, context or browser has been closed Call log: - waiting for getByRole('switch', { name: 'Simple' }) at Object.isInSimpleMode (/home/runner/work/JupyterCAD/JupyterCAD/ui-tests/node_modules/@jupyterlab/galata/src/utils.ts:311:17) at ActivityHelper.isTabActive (/home/runner/work/JupyterCAD/JupyterCAD/ui-tests/node_modules/@jupyterlab/galata/src/helpers/activity.ts:46:21) at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/node_modules/@jupyterlab/galata/src/fixtures.ts:326:33 at Timeout.check (/home/runner/work/JupyterCAD/JupyterCAD/ui-tests/node_modules/@jupyterlab/galata/src/utils.ts:183:33)

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree

1) tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree ───────────────────────────────── Error: Response has been disposed at ContentsHelper.deleteDirectory (/home/runner/work/JupyterCAD/JupyterCAD/ui-tests/node_modules/@jupyterlab/galata/src/contents.ts:258:24) at Object.tmpPath (/home/runner/work/JupyterCAD/JupyterCAD/ui-tests/node_modules/@jupyterlab/galata/src/fixtures.ts:310:7)

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree

1) tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree ───────────────────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 60000ms exceeded.

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree

1) tests/lite.spec.ts:16:7 › JupyterCAD Lite Tests › Render Tree ───────────────────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.count: Target page, context or browser has been closed at ActivityHelper.isTabActive (/home/runner/work/JupyterCAD/JupyterCAD/ui-tests/node_modules/@jupyterlab/galata/src/helpers/activity.ts:54:23) at Timeout.check (/home/runner/work/JupyterCAD/JupyterCAD/ui-tests/node_modules/@jupyterlab/galata/src/utils.ts:183:11)

test.describe('JupyterCAD Lite Tests', () => {
test.beforeEach(({ page }) => {
page.setDefaultTimeout(600000);

page.on('console', message => {
console.log('CONSOLE MSG ---', message.text());
});
});

test.afterEach(async ({ page }) => {
await page.close({ runBeforeUnload: true });
});

test('Render Tree', async ({ page }, testInfo) => {
await page.goto('lite');

const widget = await page.getByText('widgets');

// Wait a bit for the theme to be applied
await page.waitForTimeout(1000);

expect(await page.screenshot()).toMatchSnapshot('jupytercad-lite-tree.png');

await widget.click();

expect(await page.screenshot()).toMatchSnapshot(
'jupytercad-lite-subtree.png'
);

const goUp = await page.getByTitle('Jupyter Server Root').locator('svg');
await goUp.click();

expect(await page.screenshot()).toMatchSnapshot('jupytercad-lite-tree.png');
});
});

0 comments on commit 68b731c

Please sign in to comment.