From b3142ae9a788adb4962ef8b0577a40430ebe4036 Mon Sep 17 00:00:00 2001 From: Sebastian Sebbie Silbermann Date: Wed, 7 May 2025 20:10:44 +0200 Subject: [PATCH] [test] Move test selectors as close to the actual value as possible React will start outlining boundaries if they add too many bytes to the next completion. This doesn't have any perceivable effect but some of our tests use Cheerio to parse the flushed HTML without any JS applied so the expected values might end up in a template that's within the element you're targetting with CSS selectors. The real fix is using `next.browser` instead but that's slower so we just make sure React can't break up targetted elements and the expected values. --- .../app/headers/exercise/components.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/e2e/app-dir/dynamic-io/app/headers/exercise/components.tsx b/test/e2e/app-dir/dynamic-io/app/headers/exercise/components.tsx index 17fc75026f668..ed2c0392ae237 100644 --- a/test/e2e/app-dir/dynamic-io/app/headers/exercise/components.tsx +++ b/test/e2e/app-dir/dynamic-io/app/headers/exercise/components.tsx @@ -104,8 +104,8 @@ function Get({ return (

{expression}.get('...')

-
-
{headers.get('x-sentinel')}
+
+
{headers.get('x-sentinel')}
) @@ -194,8 +194,8 @@ function ForEach({ headers.forEach((value, header) => { if (header.startsWith('x-sentinel')) { output.push( -
-
{value}
+
+
{value}
) } @@ -300,8 +300,8 @@ function ForOf({ for (let [headerName, value] of headers) { if (headerName.startsWith('x-sentinel')) { output.push( -
-
{value}
+
+
{value}
) } @@ -326,8 +326,8 @@ function Spread({ .filter(([headerName]) => headerName.startsWith('x-sentinel')) .map((v) => { return ( -
-
{v[1]}
+
+
{v[1]}
) })