-
Notifications
You must be signed in to change notification settings - Fork 10
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
9b2cf5a
commit 76f13a6
Showing
4 changed files
with
67 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Configuration for Playwright using default from @jupyterlab/galata | ||
*/ | ||
const baseConfig = require('@jupyterlab/galata/lib/playwright-config'); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
testMatch: 'tests/notebook*.spec.ts', | ||
use: { | ||
...baseConfig.use, | ||
appPath: '' | ||
}, | ||
webServer: { | ||
command: 'jlpm start:notebook', | ||
url: 'http://localhost:8888/tree', | ||
timeout: 120 * 1000, | ||
reuseExistingServer: !process.env.CI | ||
} | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { expect, test as base } from '@jupyterlab/galata'; | ||
|
||
export const test = base.extend({ | ||
waitForApplication: async ({ baseURL }, use, testInfo) => { | ||
const waitIsReady = async (page): Promise<void> => { | ||
await page.waitForSelector('#main-panel'); | ||
}; | ||
await use(waitIsReady); | ||
}, | ||
}); | ||
|
||
test('should run the welcome tour', async ({ page }) => { | ||
|
||
await page.getByRole('button', { name: 'Start now' }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
|
||
await expect | ||
.soft(page.locator('.react-joyride__tooltip h4')) | ||
.toHaveText('Command Palette'); | ||
await page.getByLabel('Done').click(); | ||
}); | ||
|
||
test('should run the notebook tour', async ({ page }) => { | ||
await page.getByRole('menuitem', { name: 'File' }).click(); | ||
await page.getByText('New', { exact: true }).click(); | ||
await page.locator('#jp-mainmenu-file-new').getByText('Notebook').click(); | ||
await page.getByRole('button', { name: 'Select Kernel' }).click(); | ||
await page.getByRole('button', { name: 'Start now' }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await page.getByLabel('Next', { exact: true }).click(); | ||
await expect | ||
.soft(page.locator('.react-joyride__tooltip p')) | ||
.toHaveText(/Its name and its status are displayed here\.$/); | ||
await page.getByLabel('Done').click(); | ||
}); |