Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Add UI test to check the retrolab settings are persisted (#281)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jtpio authored Nov 12, 2021
1 parent 67961d9 commit e18c3a8
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions ui-tests/test/settings.spec.ts
Original file line number Diff line number Diff line change
@@ -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');
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e18c3a8

Please sign in to comment.