Skip to content

Commit

Permalink
feat(overlay): apply data-* header for the error desc (#4015)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kwonoj authored Mar 1, 2023
1 parent 55d7f5e commit 129640c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down

0 comments on commit 129640c

Please sign in to comment.