Skip to content

Commit 030553a

Browse files
committed
Add ui-tests for error handling
1 parent 38b23c2 commit 030553a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ui-tests/tests/voila.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,27 @@ test.describe('Voila performance Tests', () => {
161161
);
162162
});
163163

164+
test('Render 404 error', async ({ page }) => {
165+
await page.goto(`/voila/render/unknown.ipynb`);
166+
await page.waitForSelector('.voila-error');
167+
168+
expect(await page.screenshot()).toMatchSnapshot(`404.png`);
169+
});
170+
171+
test('Render 404 error with classic template', async ({ page }) => {
172+
await page.goto(`/voila/render/unknown.ipynb?voila-template=classic`);
173+
await page.waitForSelector('.voila-error');
174+
175+
expect(await page.screenshot()).toMatchSnapshot(`404-classic.png`);
176+
});
177+
178+
test('Render 404 error with dark theme', async ({ page }) => {
179+
await page.goto(`/voila/render/unknown.ipynb?voila-theme=dark`);
180+
await page.waitForSelector('.voila-error');
181+
182+
expect(await page.screenshot()).toMatchSnapshot(`404-dark.png`);
183+
});
184+
164185
test('Render and benchmark bqplot.ipynb', async ({
165186
page,
166187
browserName

0 commit comments

Comments
 (0)