Skip to content

Commit 68b731c

Browse files
committed
Configure UI tests for Lite Deployment
1 parent a4a0599 commit 68b731c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

ui-tests/tests/lite.spec.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { expect, test, galata } from '@jupyterlab/galata';
2+
3+
test.describe('JupyterCAD Lite Tests', () => {
4+
test.beforeEach(({ page }) => {
5+
page.setDefaultTimeout(600000);
6+
7+
page.on('console', message => {
8+
console.log('CONSOLE MSG ---', message.text());
9+
});
10+
});
11+
12+
test.afterEach(async ({ page }) => {
13+
await page.close({ runBeforeUnload: true });
14+
});
15+
16+
test('Render Tree', async ({ page }, testInfo) => {
17+
await page.goto('lite');
18+
19+
const widget = await page.getByText('widgets');
20+
21+
// Wait a bit for the theme to be applied
22+
await page.waitForTimeout(1000);
23+
24+
expect(await page.screenshot()).toMatchSnapshot('jupytercad-lite-tree.png');
25+
26+
await widget.click();
27+
28+
expect(await page.screenshot()).toMatchSnapshot(
29+
'jupytercad-lite-subtree.png'
30+
);
31+
32+
const goUp = await page.getByTitle('Jupyter Server Root').locator('svg');
33+
await goUp.click();
34+
35+
expect(await page.screenshot()).toMatchSnapshot('jupytercad-lite-tree.png');
36+
});
37+
});

0 commit comments

Comments
 (0)