feat(overlay): apply data-* header for the error desc (vercel/turbo#4015)

Partially resolves WEB-671.

There are some test cases use `data-nextjs-dialog-header` to lookup its
inner text to verify error output. Due to differences of error overlay
layout between turbopack / next-dev, those 2 have different inner texts.

PR applies a workaround, by introducing new data tag
`data-nextjs-turbo-dialog-body`. Next.js upstream will need following
update to utilize this tag in its test suites.
This commit is contained in:
OJ Kwon 2023-02-28 17:27:30 -08:00 committed by GitHub
parent 7e2d931ffa
commit fc10d02366

View file

@ -255,7 +255,11 @@ export function RuntimeErrorsDialogBody({
</small>
</LeftRightDialogHeader>
</div>
<h2 id="nextjs__container_errors_desc" data-severity="error">
<h2
data-nextjs-turbo-dialog-body
id="nextjs__container_errors_desc"
data-severity="error"
>
{activeError.error.name}:{" "}
<HotlinkedText
text={decodeMagicIdentifiers(activeError.error.message)}