This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
5 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}); | ||
}); |
Binary file added
BIN
+27.5 KB
ui-tests/test/settings.spec.ts-snapshots/top-hidden-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.7 KB
ui-tests/test/settings.spec.ts-snapshots/top-hidden-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.6 KB
ui-tests/test/settings.spec.ts-snapshots/top-visible-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27.3 KB
ui-tests/test/settings.spec.ts-snapshots/top-visible-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.