Skip to content

Commit

Permalink
Move the NotFound test to playwright.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Jan 14, 2025
1 parent 7626cb4 commit e8aa459
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
2 changes: 1 addition & 1 deletion frontend/e2e/notFound.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { test, expect } from '@playwright/test';

test('shows 404 page for non-existent routes', async ({ page }) => {
await page.goto('/#/non-existent-route');
await expect(page.getByText('Page not found')).toBeVisible();
await expect(page.getByText('Page Not Found')).toBeVisible();
});
30 changes: 0 additions & 30 deletions frontend/src/components/NotFound.test.tsx

This file was deleted.

3 changes: 2 additions & 1 deletion frontend/src/components/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Link } from "react-router";
import { useContext } from "react";

import { ThemeContext } from "../context/ThemeContext";

const NotFound = () => {
Expand All @@ -10,7 +11,7 @@ const NotFound = () => {
<h1
className={`display-4 fw-bold mb-4 ${isDarkMode ? "text-info" : "text-secondary"}`}
>
404 Not Found
Page Not Found
</h1>
<p className="fs-5 text-muted mb-4 text-center">
Sorry, the page you&apos;re looking for doesn&apos;t exist.
Expand Down

0 comments on commit e8aa459

Please sign in to comment.