jupyterlab-sandbox-announce.../ui-tests/tests/jupyterlab-sandbox-announce...

22 lines
538 B
TypeScript
Raw Normal View History

2023-02-04 20:07:10 +00:00
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);
});