mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
test: named LazyVisible components
This commit is contained in:
parent
b143038cef
commit
b1c498bea7
@ -2637,11 +2637,10 @@ describe('lazy import components', () => {
|
||||
|
||||
it('lazy load delayed hydration comps at the right time', async () => {
|
||||
expect(html).not.toContain('This shouldn\'t be visible at first!')
|
||||
expect(html).toContain('This should be visible at first!')
|
||||
const { page } = await renderPage('/lazy-import-components')
|
||||
expect(await page.locator('body').getByText('This shouldn\'t be visible at first!').all()).toHaveLength(1)
|
||||
const response = page.waitForResponse(response => response.url().includes('DelayedWrapperTestComponent') && response.status() === 200)
|
||||
await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight))
|
||||
await response
|
||||
expect(await page.locator('body').getByText('This shouldn\'t be visible at first!').all()).toHaveLength(1)
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user