mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-28 16:42:04 +00:00
test: wait for navigation in redirect test
This commit is contained in:
parent
1eb08d1ba4
commit
e747156061
@ -259,11 +259,11 @@ describe('basic browser', () => {
|
|||||||
// New page for redirecting to external link.
|
// New page for redirecting to external link.
|
||||||
const page = await browser.page(url('/'))
|
const page = await browser.page(url('/'))
|
||||||
|
|
||||||
await page.nuxt.navigate('/redirect-external', false)
|
await Promise.all([
|
||||||
|
page.nuxt.navigate('/redirect-external', false),
|
||||||
await page.waitForFunction(
|
page.waitForNavigation()
|
||||||
() => window.location.href === 'https://example.com/test/'
|
])
|
||||||
)
|
await page.waitForFunction(() => window.location.href === 'https://example.com/test/')
|
||||||
await page.close()
|
await page.close()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user