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

Commit e18c3a8

Browse files
authored
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
1 parent 67961d9 commit e18c3a8

File tree

5 files changed

+31
-0
lines changed

5 files changed

+31
-0
lines changed

ui-tests/test/settings.spec.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright (c) Jupyter Development Team.
2+
// Distributed under the terms of the Modified BSD License.
3+
4+
import { test } from './fixtures';
5+
6+
import { expect } from '@playwright/test';
7+
8+
test.use({ autoGoto: false });
9+
10+
test.describe('Settings', () => {
11+
test('Should be persisted after reloading the page', async ({
12+
page,
13+
tmpPath
14+
}) => {
15+
const showHeaderPath = 'View>Show Header';
16+
17+
await page.goto(`tree/${tmpPath}`);
18+
19+
await page.menu.clickMenuItem(showHeaderPath);
20+
await page.reload({ waitUntil: 'networkidle' });
21+
22+
await page.menu.getMenuItem(showHeaderPath);
23+
expect(await page.screenshot()).toMatchSnapshot('top-hidden.png');
24+
25+
await page.menu.clickMenuItem(showHeaderPath);
26+
await page.reload({ waitUntil: 'networkidle' });
27+
28+
await page.menu.getMenuItem(showHeaderPath);
29+
expect(await page.screenshot()).toMatchSnapshot('top-visible.png');
30+
});
31+
});
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)