Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 13, 2025
1 parent 9513068 commit cfdb5d5
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions ui-tests/tests/lite.spec.ts
Original file line number Diff line number Diff line change
@@ -1,35 +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 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 ───────────────────────────────── 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.isChecked: Target page, context or browser has been closed 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 ───────────────────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── 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)

test.describe('JupyterCAD Lite Tests', () => {
test.beforeEach(({ page }) => {
page.setDefaultTimeout(600000);
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 });
page.on('console', message => {
console.log('CONSOLE MSG ---', message.text());
});
});

test('Render Tree', async ({ page }, testInfo) => {
await page.goto('lite');
test.afterEach(async ({ page }) => {
await page.close({ runBeforeUnload: true });
});

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

// Wait a bit for the theme to be applied
await page.waitForTimeout(1000);
const widget = await page.getByText('widgets');

expect(await page.screenshot()).toMatchSnapshot('jupytercad-lite-tree.png');
// Wait a bit for the theme to be applied
await page.waitForTimeout(1000);

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

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

const goUp = await page.getByTitle('Jupyter Server Root').locator('svg');
await goUp.click();
expect(await page.screenshot()).toMatchSnapshot(
'jupytercad-lite-subtree.png'
);

expect(await page.screenshot()).toMatchSnapshot('jupytercad-lite-tree.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 cfdb5d5

Please sign in to comment.