Skip to content

Commit

Permalink
fix(core): custom 404 page not rendering (#957)
Browse files Browse the repository at this point in the history
  • Loading branch information
deini committed May 30, 2024
1 parent f30d75c commit 0a3b519
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-bees-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": patch
---

fix custom 404 page not being used
5 changes: 5 additions & 0 deletions core/app/[locale]/(default)/[...rest]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { notFound } from 'next/navigation';

export default function CatchAllPage() {
notFound();
}
7 changes: 7 additions & 0 deletions core/tests/ui/desktop/e2e/404.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { expect, test } from '@playwright/test';

test('404 page', async ({ page }) => {
await page.goto('/unknown-url');

await expect(page.getByRole('heading', { name: "We couldn't find that page!" })).toBeVisible();
});

0 comments on commit 0a3b519

Please sign in to comment.