Merge branch 'nuxt:patch-21' into patch-21

This commit is contained in:
Michael Brevard 2024-04-10 00:11:00 +03:00 committed by GitHub
commit 717a91c10a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2544,7 +2544,7 @@ describe('import components', () => {
}) })
}) })
describe('lazy import components', () => { describe.only('lazy import components', () => {
let html = '' let html = ''
it.sequential('fetch lazy-import-components page', async () => { it.sequential('fetch lazy-import-components page', async () => {
@ -2568,6 +2568,7 @@ describe('lazy import components', () => {
const { page } = await renderPage('/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) 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.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) expect(await page.locator('body').getByText('This shouldn\'t be visible at first!').all()).toHaveLength(1)
}) })
}) })