MCPcopy
hub / github.com/vercel/next.js / getRedboxDescription

Function getRedboxDescription

test/lib/next-test-utils.ts:1212–1224  ·  view source on GitHub ↗
(
  browser: Playwright
)

Source from the content-addressed store, hash-verified

1210}
1211
1212export function getRedboxDescription(
1213 browser: Playwright
1214): Promise<string | null> {
1215 return browser.eval(() => {
1216 const portal = [].slice
1217 .call(document.querySelectorAll('nextjs-portal'))
1218 .find((p) => p.shadowRoot.querySelector('[data-nextjs-dialog-header]'))
1219 const root = portal.shadowRoot
1220 return (
1221 root.querySelector('#nextjs__container_errors_desc')?.innerText ?? null
1222 )
1223 })
1224}
1225
1226export function getRedboxErrorCode(
1227 browser: Playwright

Calls 3

evalMethod · 0.80
callMethod · 0.80
findMethod · 0.45

Tested by 2

runTestsFunction · 0.72
containConflictsErrorFunction · 0.72