jupyterlab_sandbox_theme/ui-tests/tests/jupyterlab_sandbox_theme.sp...

22 lines
531 B
TypeScript
Raw Normal View History

2023-01-23 10:37:59 +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_theme is activated!')
).toHaveLength(1);
});