💄(app-desk) integrate design 404 page

Introduce a first draft of 404 page based on Johann's design. Please
refer to the Figma file for more info. This page is tested through
tests e2e. It closes the issue #112
This commit is contained in:
daproclaima
2024-03-19 10:57:41 +01:00
committed by aleb_the_flash
parent 4af4c4de50
commit a54bcbcb1e
5 changed files with 86 additions and 12 deletions

View File

@@ -0,0 +1,29 @@
import { expect, test } from '@playwright/test';
import { keyCloakSignIn } from './common';
test.beforeEach(async ({ page, browserName }) => {
await page.goto('/');
await keyCloakSignIn(page, browserName);
await page.goto('unknown-page404');
});
test.describe('404', () => {
test('Checks all the elements are visible', async ({ page }) => {
await expect(page.getByLabel('Image 404')).toBeVisible();
await expect(page.getByText('Ouch')).toBeVisible();
await expect(
page.getByText(
'It seems that the page you are looking for does not exist or cannot be displayed correctly.',
),
).toBeVisible();
await expect(page.getByText('Back to home page')).toBeVisible();
});
test('checks go back to home page redirects to home page', async ({
page,
}) => {
await page.getByText('Back to home page').click();
await expect(page).toHaveURL('/');
});
});

View File

@@ -116,7 +116,11 @@ test.describe('Teams Create', () => {
test('checks 404 on teams/[id] page', async ({ page }) => {
await page.goto('/teams/some-unknown-team');
await expect(page.getByText('404 - Page not found')).toBeVisible({
await expect(
page.getByText(
'It seems that the page you are looking for does not exist or cannot be displayed correctly.',
),
).toBeVisible({
timeout: 15000,
});
});