Skip to content

Add console test #501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ui-tests/tests/ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,31 @@
}
});
});

test.describe('Console activation test', () => {
test.beforeAll(async ({ request }) => {
const content = galata.newContentsHelper(request);
await content.deleteDirectory('/testDir');
await content.uploadDirectory(
path.resolve(__dirname, './gis-files'),
'/testDir'
);
});

test('should open console', async ({ page }) => {
await page.goto();
await page.sidebar.close('right');
await page.sidebar.close('left');
await page.getByLabel('notebook content').getByText('GIS File').click();
await page.getByRole('button', { name: 'Toggle console' }).click();
await page.getByRole('button', { name: 'Remove console' });

const main = await page.locator('#jp-main-dock-panel');

if (main) {
expect(await main.screenshot()).toMatchSnapshot({

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/ui.spec.ts:82:7 › Console activation test › should open console

1) tests/ui.spec.ts:82:7 › Console activation test › should open console ───────────────────────── Error: expect(Buffer).toMatchSnapshot(expected) 1202 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/jupytergis/jupytergis/ui-tests/tests/ui.spec.ts-snapshots/JGIS-Console-linux.png Received: /home/runner/work/jupytergis/jupytergis/ui-tests/test-results/tests-ui-Console-activation-test-should-open-console/JGIS-Console-actual.png Diff: /home/runner/work/jupytergis/jupytergis/ui-tests/test-results/tests-ui-Console-activation-test-should-open-console/JGIS-Console-diff.png 91 | 92 | if (main) { > 93 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 94 | name: `JGIS-Console.png` 95 | }); 96 | } at /home/runner/work/jupytergis/jupytergis/ui-tests/tests/ui.spec.ts:93:39

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/ui.spec.ts:82:7 › Console activation test › should open console

1) tests/ui.spec.ts:82:7 › Console activation test › should open console ───────────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(Buffer).toMatchSnapshot(expected) 3703 pixels (ratio 0.02 of all image pixels) are different. Expected: /home/runner/work/jupytergis/jupytergis/ui-tests/tests/ui.spec.ts-snapshots/JGIS-Console-linux.png Received: /home/runner/work/jupytergis/jupytergis/ui-tests/test-results/tests-ui-Console-activation-test-should-open-console-retry1/JGIS-Console-actual.png Diff: /home/runner/work/jupytergis/jupytergis/ui-tests/test-results/tests-ui-Console-activation-test-should-open-console-retry1/JGIS-Console-diff.png 91 | 92 | if (main) { > 93 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 94 | name: `JGIS-Console.png` 95 | }); 96 | } at /home/runner/work/jupytergis/jupytergis/ui-tests/tests/ui.spec.ts:93:39

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

View workflow job for this annotation

GitHub Actions / Integration tests

tests/ui.spec.ts:82:7 › Console activation test › should open console

1) tests/ui.spec.ts:82:7 › Console activation test › should open console ───────────────────────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(Buffer).toMatchSnapshot(expected) 1438 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/jupytergis/jupytergis/ui-tests/tests/ui.spec.ts-snapshots/JGIS-Console-linux.png Received: /home/runner/work/jupytergis/jupytergis/ui-tests/test-results/tests-ui-Console-activation-test-should-open-console-retry2/JGIS-Console-actual.png Diff: /home/runner/work/jupytergis/jupytergis/ui-tests/test-results/tests-ui-Console-activation-test-should-open-console-retry2/JGIS-Console-diff.png 91 | 92 | if (main) { > 93 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 94 | name: `JGIS-Console.png` 95 | }); 96 | } at /home/runner/work/jupytergis/jupytergis/ui-tests/tests/ui.spec.ts:93:39
name: `JGIS-Console.png`
});
}
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading