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 update
pull/6294/head
Jeremy Tuloup 5 years ago committed by GitHub
parent 67961d9f2a
commit e18c3a85ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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');
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Loading…
Cancel
Save