Skip to content

Commit

Permalink
aa
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoLC committed May 3, 2024
1 parent 772284e commit 8f648bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/frontend/apps/e2e/__tests__/app-impress/404.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { expect, test } from '@playwright/test';

test.beforeEach(async ({ page }) => {
await page.goto('/');
await expect(
page.locator('header').first().locator('h2').getByText('Impress'),
).toBeVisible();
await page.goto('unknown-page404');
});

test.describe('404', () => {
test('Checks all the elements are visible', async ({ page }) => {
await page.goto('unknown-page404');
await expect(page.getByLabel('Image 404')).toBeVisible();
await expect(page.getByText('Ouch')).toBeVisible();
await expect(
Expand All @@ -20,7 +23,6 @@ test.describe('404', () => {
test('checks go back to home page redirects to home page', async ({
page,
}) => {
await page.goto('unknown-page404');
await page.getByText('Back to home page').click();
await expect(page).toHaveURL('/');
});
Expand Down

0 comments on commit 8f648bb

Please sign in to comment.