diff --git a/test/lib/next-test-utils.ts b/test/lib/next-test-utils.ts index b55e97a125ea2..8e11e6e417e60 100644 --- a/test/lib/next-test-utils.ts +++ b/test/lib/next-test-utils.ts @@ -781,28 +781,15 @@ export async function hasRedbox(browser: BrowserInterface, expected = true) { export async function getRedboxHeader(browser: BrowserInterface) { return retry( () => { - if (shouldRunTurboDevTest()) { - return evaluate(browser, () => { - const portal = [].slice - .call(document.querySelectorAll('nextjs-portal')) - .find((p) => - p.shadowRoot.querySelector('[data-nextjs-turbo-dialog-body]') - ) - const root = portal?.shadowRoot - return root?.querySelector('[data-nextjs-turbo-dialog-body]') - ?.innerText - }) - } else { - return evaluate(browser, () => { - const portal = [].slice - .call(document.querySelectorAll('nextjs-portal')) - .find((p) => - p.shadowRoot.querySelector('[data-nextjs-dialog-header]') - ) - const root = portal?.shadowRoot - return root?.querySelector('[data-nextjs-dialog-header]')?.innerText - }) - } + return evaluate(browser, () => { + const portal = [].slice + .call(document.querySelectorAll('nextjs-portal')) + .find((p) => + p.shadowRoot.querySelector('[data-nextjs-dialog-header]') + ) + const root = portal?.shadowRoot + return root?.querySelector('[data-nextjs-dialog-header]')?.innerText + }) }, 10000, 500,