From 329ee006829787f4b757747bb5cc78c62450afc3 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Thu, 30 Mar 2023 14:04:55 +0200 Subject: [PATCH] add root not found case --- test/e2e/app-dir/metadata/app/not-found.tsx | 3 +++ test/e2e/app-dir/metadata/metadata.test.ts | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 test/e2e/app-dir/metadata/app/not-found.tsx diff --git a/test/e2e/app-dir/metadata/app/not-found.tsx b/test/e2e/app-dir/metadata/app/not-found.tsx new file mode 100644 index 0000000000000..6030ea22604bd --- /dev/null +++ b/test/e2e/app-dir/metadata/app/not-found.tsx @@ -0,0 +1,3 @@ +export default function notFound() { + return

root not found page

+} diff --git a/test/e2e/app-dir/metadata/metadata.test.ts b/test/e2e/app-dir/metadata/metadata.test.ts index 775a164ea0f4e..b298b7dd828fd 100644 --- a/test/e2e/app-dir/metadata/metadata.test.ts +++ b/test/e2e/app-dir/metadata/metadata.test.ts @@ -369,12 +369,11 @@ createNextDescribe( const res = await next.fetch('/async/not-found') expect(res.status).toBe(404) const html = await res.text() - expect(html).not.toBe('not-found-text') - expect(html).toContain('This page could not be found.') + expect(html).toContain('root not found page') const browser = await next.browser('/async/not-found') expect(await browser.elementByCss('h2').text()).toBe( - 'This page could not be found.' + 'root not found page' ) })