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

Add UI test to check the retrolab settings are persisted #281

Merged
merged 8 commits into from
Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.