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 18, 2025
1 parent 918d3e7 commit 7ceabb1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
19 changes: 13 additions & 6 deletions ui-tests/tests/lite.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ test.describe('UI Test', () => {
});

for (const file of fileList) {
test(`Should be able to render ${file} without error`, async ({ browser }) => {
test(`Should be able to render ${file} without error`, async ({
browser
}) => {
const context = await browser.newContext();
const page = await context.newPage();

await page.goto(`lab/index.html?path=${file}`, {waitUntil: 'domcontentloaded'});
await page.goto(`lab/index.html?path=${file}`, {
waitUntil: 'domcontentloaded'
});
console.log('FILE LOADED');

await page.locator('div.jpcad-Spinner').waitFor({ state: 'hidden' });
Expand All @@ -39,10 +43,13 @@ test.describe('UI Test', () => {
// await page.sidebar.close('right');
await page.waitForTimeout(1000);

const main = await page.waitForSelector('#jp-main-split-panel', { state: 'visible', timeout: 10000 });
const main = await page.waitForSelector('#jp-main-split-panel', {
state: 'visible',
timeout: 10000
});

console.log('hurrayyyy', main);

console.log('hurrayyyy',main);

expect(errors).toBe(0);
if (main) {
expect(await main.screenshot()).toMatchSnapshot({

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/lite.spec.ts:24:9 › UI Test › Should be able to render test.jcad without error

1) tests/lite.spec.ts:24:9 › UI Test › Should be able to render test.jcad without error ────────── Error: A snapshot doesn't exist at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts-snapshots/Render-test-jcad-linux.png, writing actual. 53 | expect(errors).toBe(0); 54 | if (main) { > 55 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 56 | name: `Render-${file}.png`, 57 | maxDiffPixelRatio: 0.01 58 | }); at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts:55:41

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/lite.spec.ts:24:9 › UI Test › Should be able to render 3M_CONNECTOR.STEP without error

2) tests/lite.spec.ts:24:9 › UI Test › Should be able to render 3M_CONNECTOR.STEP without error ── Error: A snapshot doesn't exist at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts-snapshots/Render-3M-CONNECTOR-STEP-linux.png, writing actual. 53 | expect(errors).toBe(0); 54 | if (main) { > 55 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 56 | name: `Render-${file}.png`, 57 | maxDiffPixelRatio: 0.01 58 | }); at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts:55:41

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/lite.spec.ts:24:9 › UI Test › Should be able to render fan.stl without error

3) tests/lite.spec.ts:24:9 › UI Test › Should be able to render fan.stl without error ──────────── Error: A snapshot doesn't exist at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts-snapshots/Render-fan-stl-linux.png, writing actual. 53 | expect(errors).toBe(0); 54 | if (main) { > 55 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 56 | name: `Render-${file}.png`, 57 | maxDiffPixelRatio: 0.01 58 | }); at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts:55:41

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

View workflow job for this annotation

GitHub Actions / Integration tests Lite

tests/lite.spec.ts:24:9 › UI Test › Should be able to render test.jcad without error

1) tests/lite.spec.ts:24:9 › UI Test › Should be able to render test.jcad without error ────────── Error: A snapshot doesn't exist at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts-snapshots/Render-test-jcad-linux.png, writing actual. 53 | expect(errors).toBe(0); 54 | if (main) { > 55 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 56 | name: `Render-${file}.png`, 57 | maxDiffPixelRatio: 0.01 58 | }); at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts:55:41

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

View workflow job for this annotation

GitHub Actions / Integration tests Lite

tests/lite.spec.ts:24:9 › UI Test › Should be able to render 3M_CONNECTOR.STEP without error

2) tests/lite.spec.ts:24:9 › UI Test › Should be able to render 3M_CONNECTOR.STEP without error ── Error: A snapshot doesn't exist at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts-snapshots/Render-3M-CONNECTOR-STEP-linux.png, writing actual. 53 | expect(errors).toBe(0); 54 | if (main) { > 55 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 56 | name: `Render-${file}.png`, 57 | maxDiffPixelRatio: 0.01 58 | }); at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts:55:41

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

View workflow job for this annotation

GitHub Actions / Integration tests Lite

tests/lite.spec.ts:24:9 › UI Test › Should be able to render fan.stl without error

3) tests/lite.spec.ts:24:9 › UI Test › Should be able to render fan.stl without error ──────────── Error: A snapshot doesn't exist at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts-snapshots/Render-fan-stl-linux.png, writing actual. 53 | expect(errors).toBe(0); 54 | if (main) { > 55 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 56 | name: `Render-${file}.png`, 57 | maxDiffPixelRatio: 0.01 58 | }); at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/lite.spec.ts:55:41
Expand All @@ -52,4 +59,4 @@ test.describe('UI Test', () => {
}
});
}
});
});
6 changes: 2 additions & 4 deletions ui-tests/tests/ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ test.describe('UI Test', () => {
const fileList = ['test.jcad', '3M_CONNECTOR.STEP', 'fan.stl'];

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

page.on('console', message => {
Expand All @@ -19,7 +17,7 @@ test.describe('UI Test', () => {
});

console.log('pagey', page);

await page.goto('?path=pad.jcad');

expect(logs.filter(s => s === 'Initializing OCC...')).toHaveLength(1);
Expand Down

0 comments on commit 7ceabb1

Please sign in to comment.