From aae2bd54d66ea4964bf030ddce9d71ae140c3da3 Mon Sep 17 00:00:00 2001 From: Sebastian Sebbie Silbermann Date: Mon, 3 Feb 2025 23:29:51 +0100 Subject: [PATCH] Update assertions --- .../app-dir/missing-required-html-tags/index.test.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/development/app-dir/missing-required-html-tags/index.test.ts b/test/development/app-dir/missing-required-html-tags/index.test.ts index f9d2de956e517..98ad32b89311b 100644 --- a/test/development/app-dir/missing-required-html-tags/index.test.ts +++ b/test/development/app-dir/missing-required-html-tags/index.test.ts @@ -3,6 +3,8 @@ import { assertHasRedbox, assertNoRedbox, getRedboxDescription, + getRedboxTotalErrorCount, + openRedbox, retry, } from 'next-test-utils' import { outdent } from 'outdent' @@ -61,7 +63,13 @@ describe('app-dir - missing required html tags', () => { ) ) - await assertHasRedbox(browser) + await openRedbox(browser) + // TODO(NDX-768): Should show "missing tags" error + expect(await getRedboxDescription(browser)).toMatchInlineSnapshot(` + "In HTML,

cannot be a child of <#document>. + This will cause a hydration error." + `) + expect(await getRedboxTotalErrorCount(browser)).toBe(1) // Fix the issue again await next.patchFile('app/layout.js', (code) =>