From f53d016010cd646c729ee1575f9704de00da8f78 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Wed, 9 Mar 2022 09:53:42 +0100 Subject: [PATCH] Add ui-tests for error handling --- ui-tests/tests/voila.test.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ui-tests/tests/voila.test.ts b/ui-tests/tests/voila.test.ts index ddaca1412..962fbc43b 100644 --- a/ui-tests/tests/voila.test.ts +++ b/ui-tests/tests/voila.test.ts @@ -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