-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a9fcda
commit 65a3a01
Showing
5 changed files
with
113 additions
and
9 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
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
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
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
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 |
---|---|---|
@@ -1,6 +1,36 @@ | ||
import { expect, test } from '@jupyterlab/galata'; | ||
import { expect, test, galata } from '@jupyterlab/galata'; | ||
|
||
test('should render new launcher', async ({ page }) => { | ||
const launcher = page.locator('.jp-LauncherBody'); | ||
expect(await launcher.screenshot()).toMatchSnapshot('launcher.png'); | ||
const SETTINGS_ID = 'jupyterlab-new-launcher:plugin'; | ||
|
||
describe('Default settings', () => { | ||
test('should render new launcher', async ({ page }) => { | ||
const launcher = page.locator('.jp-LauncherBody'); | ||
expect(await launcher.screenshot()).toMatchSnapshot('launcher.png'); | ||
}); | ||
}); | ||
|
||
describe('With starred section', () => { | ||
test.use({ | ||
mockSettings: { | ||
...galata.DEFAULT_SETTINGS, | ||
[SETTINGS_ID]: { | ||
...galata.DEFAULT_SETTINGS[SETTINGS_ID], | ||
starredSection: true | ||
} | ||
} | ||
}); | ||
|
||
test('should render new launcher with starred section', async ({ page }) => { | ||
const launcher = page.locator('.jp-LauncherBody'); | ||
// expand the console section | ||
await page.locator('.jp-Launcher-launchConsole summary').click(); | ||
// star some items | ||
await page | ||
.locator('.jp-Launcher-launchNotebook .jp-starIconButton') | ||
.click(); | ||
await page.locator('.jp-Launcher-launchConsole .jp-starIconButton').click(); | ||
expect(await launcher.screenshot()).toMatchSnapshot( | ||
'launcher-with-starred.png' | ||
); | ||
}); | ||
}); |