22 lines
538 B
TypeScript
22 lines
538 B
TypeScript
|
import { expect, test } from '@jupyterlab/galata';
|
||
|
|
||
|
/**
|
||
|
* Don't load JupyterLab webpage before running the tests.
|
||
|
* This is required to ensure we capture all log messages.
|
||
|
*/
|
||
|
test.use({ autoGoto: false });
|
||
|
|
||
|
test('should emit an activation console message', async ({ page }) => {
|
||
|
const logs: string[] = [];
|
||
|
|
||
|
page.on('console', message => {
|
||
|
logs.push(message.text());
|
||
|
});
|
||
|
|
||
|
await page.goto();
|
||
|
|
||
|
expect(
|
||
|
logs.filter(s => s === 'JupyterLab extension jupyterlab-sandbox-announcement is activated!')
|
||
|
).toHaveLength(1);
|
||
|
});
|