Unverified Commit efbc187d authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[test] Speed up refresh test (#85505)

parent 69ccb0b6
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import { waitFor } from 'next-test-utils' import { assertNoRedbox } from 'next-test-utils'
import { createSandbox, waitForHydration } from 'development-sandbox' import { waitForHydration } from 'development-sandbox'
describe('basic app-dir tests', () => { describe('basic app-dir tests', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
...@@ -8,18 +8,10 @@ describe('basic app-dir tests', () => { ...@@ -8,18 +8,10 @@ describe('basic app-dir tests', () => {
}) })
it('should reload app pages without error', async () => { it('should reload app pages without error', async () => {
await using sandbox = await createSandbox(next, undefined, '/') const browser = await next.browser('/')
const { session, browser } = sandbox await browser.refresh()
await session.assertNoRedbox()
browser.refresh()
await waitFor(750)
await waitForHydration(browser) await waitForHydration(browser)
for (let i = 0; i < 15; i++) { await assertNoRedbox(browser)
await session.assertNoRedbox()
await waitFor(1000)
}
}) })
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment