Unverified Commit de3d0305 authored by Josh Story's avatar Josh Story Committed by GitHub

test: update React 18 hydration error snapshots (#99073)

## What

Updates the React 18 Pages Router hydration-error inline snapshots to
match the compact rendered-tree excerpts introduced by #99008.

This is a test-only change. The runtime output is already intentional
and is shared by webpack and Turbopack.

## Why this was missed

React 18 jobs are opt-in for pull requests through the
run-react-18-tests label. #99008 did not have that label, so its React
18 snapshot branches were not exercised before merge.

## Verification

- NEXT_TEST_REACT_VERSION=18.3.1 pnpm test-dev-webpack
test/development/acceptance/hydration-error.test.ts — 15 passed, 12
snapshots passed
- NEXT_TEST_REACT_VERSION=18.3.1 pnpm test-dev-turbo
test/development/acceptance/hydration-error.test.ts — 15 passed, 12
snapshots passed
- Prettier and git diff --check
parent 14ddf68e
......@@ -246,8 +246,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
await expect(browser).toDisplayRedbox(`
[
{
"componentStack": "<Mismatch>
<div>
"componentStack": "<div>
> <div>
> "second"",
"description": "Expected server HTML to contain a matching text node for "second" in <div>.",
......@@ -257,8 +256,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
"stack": [],
},
{
"componentStack": "<Mismatch>
<div>
"componentStack": "<div>
> <div>
> "second"",
"description": "Expected server HTML to contain a matching text node for "second" in <div>.",
......@@ -383,8 +381,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
await expect(browser).toDisplayRedbox(`
[
{
"componentStack": "<Mismatch>
<div>
"componentStack": "<div>
> <div>
> "only"",
"description": "Did not expect server HTML to contain the text node "only" in <div>.",
......@@ -618,7 +615,6 @@ describe('Error overlay for hydration errors in Pages router', () => {
{
"componentStack": "<Mismatch>
> <div>
<Suspense>
> <main>",
"description": "Expected server HTML to contain a matching <main> in <div>.",
"environmentLabel": null,
......@@ -629,7 +625,6 @@ describe('Error overlay for hydration errors in Pages router', () => {
{
"componentStack": "<Mismatch>
> <div>
<Suspense>
> <main>",
"description": "Expected server HTML to contain a matching <main> in <div>.",
"environmentLabel": null,
......@@ -811,9 +806,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
await expect(browser).toDisplayRedbox(`
[
{
"componentStack": "<Page>
<div>
<div>
"componentStack": "<div>
> <p>
> <div>",
"description": "Expected server HTML to contain a matching <div> in <p>.",
......@@ -823,9 +816,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
"stack": [],
},
{
"componentStack": "<Page>
<div>
<div>
"componentStack": "<div>
> <p>
> <div>",
"description": "Expected server HTML to contain a matching <div> in <p>.",
......@@ -965,11 +956,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
await expect(browser).toDisplayRedbox(`
[
{
"componentStack": "<Page>
<p>
<span>
<span>
<span>
"componentStack": "<span>
> <span>
> <p>",
"description": "Expected server HTML to contain a matching <p> in <span>.",
......@@ -979,11 +966,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
"stack": [],
},
{
"componentStack": "<Page>
<p>
<span>
<span>
<span>
"componentStack": "<span>
> <span>
> <p>",
"description": "Expected server HTML to contain a matching <p> in <span>.",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment