Add UI test to check the retrolab settings are persisted (#281)
* Add UI test to check settings are persisted * Add snapshots for the settings * Update reference snapshots * Remove networkidle wait * Wait for menu element * Update reference snapshots * Go to tmpPath before taking snapshots * More snapshots updatepull/6294/head
parent
67961d9f2a
commit
e18c3a85ca
@ -0,0 +1,31 @@
|
||||
// Copyright (c) Jupyter Development Team.
|
||||
// Distributed under the terms of the Modified BSD License.
|
||||
|
||||
import { test } from './fixtures';
|
||||
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
test.use({ autoGoto: false });
|
||||
|
||||
test.describe('Settings', () => {
|
||||
test('Should be persisted after reloading the page', async ({
|
||||
page,
|
||||
tmpPath
|
||||
}) => {
|
||||
const showHeaderPath = 'View>Show Header';
|
||||
|
||||
await page.goto(`tree/${tmpPath}`);
|
||||
|
||||
await page.menu.clickMenuItem(showHeaderPath);
|
||||
await page.reload({ waitUntil: 'networkidle' });
|
||||
|
||||
await page.menu.getMenuItem(showHeaderPath);
|
||||
expect(await page.screenshot()).toMatchSnapshot('top-hidden.png');
|
||||
|
||||
await page.menu.clickMenuItem(showHeaderPath);
|
||||
await page.reload({ waitUntil: 'networkidle' });
|
||||
|
||||
await page.menu.getMenuItem(showHeaderPath);
|
||||
expect(await page.screenshot()).toMatchSnapshot('top-visible.png');
|
||||
});
|
||||
});
|
||||
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 27 KiB |
Loading…
Reference in new issue