mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
test: wait for network idle
This commit is contained in:
parent
b3250e4a46
commit
45e49c5beb
@ -2544,7 +2544,7 @@ describe('import components', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('lazy import components', () => {
|
||||
describe.only('lazy import components', () => {
|
||||
let html = ''
|
||||
|
||||
it.sequential('fetch lazy-import-components page', async () => {
|
||||
@ -2568,6 +2568,7 @@ describe('lazy import components', () => {
|
||||
const { page } = await renderPage('/lazy-import-components')
|
||||
expect(await page.locator('body').getByText('This shouldn\'t be visible at first!').all()).toHaveLength(0)
|
||||
await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight))
|
||||
await page.waitForLoadState('networkidle')
|
||||
expect(await page.locator('body').getByText('This shouldn\'t be visible at first!').all()).toHaveLength(1)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user