Unverified Commit 10fb5bc6 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

[devtool] enable segment explorer by default (#81737)

Enable `experimental.devtoolSegmentExplorer` on canary by default and update snapshots
parent 719bc5e7
......@@ -1463,7 +1463,7 @@ export const defaultConfig = Object.freeze({
useCache: undefined,
slowModuleDetection: undefined,
globalNotFound: false,
devtoolSegmentExplorer: false,
devtoolSegmentExplorer: true,
browserDebugInfoInTerminal: false,
optimizeRouterScrolling: false,
strictNextHead: true,
......
......@@ -73,22 +73,25 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
{
"componentStack": "...
<RenderFromTemplateContext>
<ScrollAndFocusHandler segmentPath={[...]}>
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Mismatch} searchParams={{}} params={{}}>
<Mismatch params={Promise} searchParams={Promise}>
<div className="parent">
<main className="child">
+ client
- server
...
...
...",
"description": "Hydration failed because the server rendered text didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
......@@ -150,20 +153,23 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
{
"componentStack": "...
<RenderFromTemplateContext>
<ScrollAndFocusHandler segmentPath={[...]}>
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Mismatch} searchParams={{}} params={{}}>
<Mismatch params={Promise} searchParams={Promise}>
<div className="parent">
+ <main className="only">
...
...
...",
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
......@@ -217,6 +223,8 @@ describe('Error overlay for hydration errors in App router', () => {
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<Head>
<SegmentViewNode type="layout" pagePath="layout.js">
<SegmentTrieNode>
<script>
<script>
<script>
......@@ -251,6 +259,8 @@ describe('Error overlay for hydration errors in App router', () => {
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<Head>
<SegmentViewNode type="layout" pagePath="layout.js">
<SegmentTrieNode>
<ClientSegmentRoot Component={function Root} slots={{...}} params={{}}>
<Root params={Promise}>
<html
......@@ -299,16 +309,17 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
{
"componentStack": "...
<RenderFromTemplateContext>
<ScrollAndFocusHandler segmentPath={[...]}>
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Mismatch} searchParams={{}} params={{}}>
<Mismatch params={Promise} searchParams={Promise}>
<div className="parent">
......@@ -316,6 +327,8 @@ describe('Error overlay for hydration errors in App router', () => {
+ second
- <footer className="3">
...
...
...
...",
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
......@@ -361,15 +374,19 @@ describe('Error overlay for hydration errors in App router', () => {
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Mismatch} searchParams={{}} params={{}}>
<Mismatch params={Promise} searchParams={Promise}>
<div className="parent">
- <main className="only">
...
...
...",
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
......@@ -411,15 +428,19 @@ describe('Error overlay for hydration errors in App router', () => {
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Mismatch} searchParams={{}} params={{}}>
<Mismatch params={Promise} searchParams={Promise}>
<div className="parent">
- only
...
...
...",
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
......@@ -466,21 +487,24 @@ describe('Error overlay for hydration errors in App router', () => {
[
{
"componentStack": "...
<ScrollAndFocusHandler segmentPath={[...]}>
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
<table>
<tbody>
<tr>
> test
...
...
...",
"description": "In HTML, text nodes cannot be a child of <tr>.
This will cause a hydration error.",
......@@ -501,15 +525,19 @@ describe('Error overlay for hydration errors in App router', () => {
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
+ <table>
- test
...
...
...",
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
......@@ -556,16 +584,20 @@ describe('Error overlay for hydration errors in App router', () => {
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
> <table>
> {" "}
...
...
...
...",
"description": "In HTML, whitespace text nodes cannot be a child of <table>. Make sure you don't have any extra whitespace between tags on each line of your source code.
This will cause a hydration error.",
......@@ -612,14 +644,15 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
{
"componentStack": "...
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} unauthorized={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Mismatch} searchParams={{}} params={{}}>
<Mismatch params={Promise} searchParams={Promise}>
<div className="parent">
......@@ -628,6 +661,7 @@ describe('Error overlay for hydration errors in App router', () => {
+ <main className="second">
- <footer className="3">
...
...
...",
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
......@@ -709,15 +743,19 @@ describe('Error overlay for hydration errors in App router', () => {
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
> <p>
> <p>
...
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.",
......@@ -782,21 +820,24 @@ describe('Error overlay for hydration errors in App router', () => {
[
{
"componentStack": "...
<ScrollAndFocusHandler segmentPath={[...]}>
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
<div>
<div>
> <p>
> <div>
...
...
...",
"description": "In HTML, <div> cannot be a descendant of <p>.
This will cause a hydration error.",
......@@ -857,15 +898,19 @@ describe('Error overlay for hydration errors in App router', () => {
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
> <div>
> <tr>
...
...
...",
"description": "In HTML, <tr> cannot be a child of <div>.
This will cause a hydration error.",
......@@ -929,11 +974,13 @@ describe('Error overlay for hydration errors in App router', () => {
<InnerScrollAndFocusHandler segmentPath={[...]} focusAndScrollRef={{apply:false, ...}}>
<ErrorBoundary errorComponent={undefined} errorStyles={undefined} errorScripts={undefined}>
<LoadingBoundary loading={null}>
<HTTPAccessFallbackBoundary notFound={[...]} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={[...]} forbidden={undefined} ...>
<HTTPAccessFallbackBoundary notFound={<SegmentViewNode>} forbidden={undefined} unauthorized={undefined}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<SegmentViewNode>} forbidden={undefined} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="page.js">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
> <p>
......@@ -942,6 +989,8 @@ describe('Error overlay for hydration errors in App router', () => {
<span>
<span>
> <p>
...
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.",
......@@ -1025,6 +1074,69 @@ describe('Error overlay for hydration errors in App router', () => {
)
})
if (isTurbopack) {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"description": "Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.",
"environmentLabel": null,
"label": "Console Error",
"source": "app/layout.js (7:7) @ Layout
> 7 | <Script
| ^",
"stack": [
"Layout app/layout.js (7:7)",
],
},
{
"componentStack": "...
<HotReload assetPrefix="" globalError={[...]}>
<AppDevOverlayErrorBoundary globalError={[...]}>
<ReplaySsrOnlyErrors>
<DevRootHTTPAccessFallbackBoundary>
<HTTPAccessFallbackBoundary notFound={<NotAllowedRootHTTPFallbackError>}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<NotAllowedRootHTTPFallbackError>} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<Head>
<SegmentViewNode type="layout" pagePath="layout.js">
<SegmentTrieNode>
<script>
<script>
<Layout>
> <html>
<body>
<Script src="https://ex..." strategy="beforeInte...">
> <script nonce={undefined} dangerouslySetInnerHTML={{__html:"(self.__ne..."}}>
...",
"description": "In HTML, <script> cannot be a child of <html>.
This will cause a hydration error.",
"environmentLabel": null,
"label": "Console Error",
"source": "app/layout.js (7:7) @ Layout
> 7 | <Script
| ^",
"stack": [
"script <anonymous>",
"Layout app/layout.js (7:7)",
],
},
{
"description": "<html> cannot contain a nested <script>.
See this log for the ancestor stack trace.",
"environmentLabel": null,
"label": "Console Error",
"source": "app/layout.js (5:5) @ Layout
> 5 | <html>
| ^",
"stack": [
"html <anonymous>",
"Layout app/layout.js (5:5)",
],
},
]
`)
} else {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
......@@ -1040,9 +1152,6 @@ describe('Error overlay for hydration errors in App router', () => {
},
{
"componentStack": "...
<Router actionQueue={{state:{...}, ...}} assetPrefix="" globalError={[...]} gracefullyDegrade={false}>
<HistoryUpdater>
<RuntimeStyles>
<HotReload assetPrefix="" globalError={[...]}>
<AppDevOverlayErrorBoundary globalError={[...]}>
<ReplaySsrOnlyErrors>
......@@ -1051,7 +1160,9 @@ describe('Error overlay for hydration errors in App router', () => {
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<NotAllowedRootHTTPFallbackError>} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<Head>${isTurbopack ? '\n <script>\n <script>' : ''}
<Head>
<SegmentViewNode type="layout" pagePath="layout.js">
<SegmentTrieNode>
<Layout>
> <html>
<body>
......@@ -1085,5 +1196,6 @@ describe('Error overlay for hydration errors in App router', () => {
},
]
`)
}
})
})
......@@ -21,10 +21,14 @@ describe('hydration-error-count', () => {
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/bad-nesting" tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<SegmentViewNode type="page" pagePath="bad-nestin...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
> <p>
> <p>
...
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.",
......@@ -69,11 +73,15 @@ describe('hydration-error-count', () => {
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/html-diff" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="html-diff/...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
<p>
+ client
- server
...
...
...",
"description": "Hydration failed because the server rendered text didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
......@@ -105,10 +113,14 @@ describe('hydration-error-count', () => {
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<SegmentViewNode type="page" pagePath="two-issues...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
> <p className="client">
> <p>
...
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.",
......@@ -133,12 +145,16 @@ describe('hydration-error-count', () => {
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<SegmentViewNode type="page" pagePath="two-issues...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
<p
+ className="client"
- className="server"
>
...
...
...",
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
......@@ -171,10 +187,14 @@ describe('hydration-error-count', () => {
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/hydration..." tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<SegmentViewNode type="page" pagePath="hydration-...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
> <p>
> <p>
...
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.",
......
......@@ -142,6 +142,7 @@ describe('client-dev-overlay', () => {
Static
Turbopack
Enabled
Route Info
Preferences"
`)
} else {
......@@ -151,6 +152,7 @@ describe('client-dev-overlay', () => {
Route
Static
Try Turbopack
Route Info
Preferences"
`)
}
......
......@@ -13,7 +13,7 @@ const EXTERNAL = {
const COLLECTOR_PORT = 9001
describe('opentelemetry', () => {
const { next, skipped } = nextTestSetup({
const { next, skipped, isNextDev } = nextTestSetup({
files: __dirname,
skipDeployment: true,
dependencies: require('./package.json').dependencies,
......@@ -170,7 +170,7 @@ describe('opentelemetry', () => {
},
{
attributes: {
'next.clientComponentLoadCount': 7,
'next.clientComponentLoadCount': isNextDev ? 8 : 7,
'next.span_type':
'NextNodeServer.clientComponentLoading',
},
......
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