Skip to content

Commit

Permalink
Add ui-tests for error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Mar 9, 2022
1 parent 38b23c2 commit f53d016
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ui-tests/tests/voila.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,33 @@ test.describe('Voila performance Tests', () => {
);
});

test('Render 404 error', async ({
page
}) => {
await page.goto(`/voila/render/unknown.ipynb`);
await page.waitForSelector('.voila-error');

expect(await page.screenshot()).toMatchSnapshot(`404.png`);
});

test('Render 404 error with classic template', async ({
page
}) => {
await page.goto(`/voila/render/unknown.ipynb?voila-template=classic`);
await page.waitForSelector('.voila-error');

expect(await page.screenshot()).toMatchSnapshot(`404-classic.png`);
});

test('Render 404 error with dark theme', async ({
page
}) => {
await page.goto(`/voila/render/unknown.ipynb?voila-theme=dark`);
await page.waitForSelector('.voila-error');

expect(await page.screenshot()).toMatchSnapshot(`404-dark.png`);
});

test('Render and benchmark bqplot.ipynb', async ({
page,
browserName
Expand Down

0 comments on commit f53d016

Please sign in to comment.