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

Function openRedbox

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

Source from the content-addressed store, hash-verified

982 * Success implies {@link waitForRedbox}.
983 */
984export async function openRedbox(browser: Playwright): Promise<void> {
985 const redbox = browser.locateRedbox()
986 if (await redbox.isVisible()) {
987 const error = new Error(
988 'Redbox is already open. Use `waitForRedbox` instead.'
989 )
990 Error.captureStackTrace(error, openRedbox)
991 throw error
992 }
993
994 try {
995 await browser.waitForElementByCss('[data-issues]').click()
996 } catch (cause) {
997 const error = new Error('Redbox did not open.')
998 Error.captureStackTrace(error, openRedbox)
999 throw error
1000 }
1001 await waitForRedbox(browser)
1002}
1003
1004export async function toggleDevToolsIndicatorPopover(
1005 browser: Playwright

Calls 4

locateRedboxMethod · 0.80
clickMethod · 0.80
waitForElementByCssMethod · 0.80
waitForRedboxFunction · 0.70

Tested by

no test coverage detected