diff --git a/ui-tests/tests/ui.spec.ts b/ui-tests/tests/ui.spec.ts index 2953e8257..5b8818b08 100644 --- a/ui-tests/tests/ui.spec.ts +++ b/ui-tests/tests/ui.spec.ts @@ -68,3 +68,31 @@ test.describe('UI Test', () => { } }); }); + +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({ + name: `JGIS-Console.png` + }); + } + }); +}); diff --git a/ui-tests/tests/ui.spec.ts-snapshots/JGIS-Console-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/JGIS-Console-linux.png new file mode 100644 index 000000000..b13c0731b Binary files /dev/null and b/ui-tests/tests/ui.spec.ts-snapshots/JGIS-Console-linux.png differ