test: refactor custom component test

This commit is contained in:
Michael Brevard 2024-06-28 13:39:00 +03:00 committed by GitHub
parent e7621cb222
commit b28ee7896d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2715,11 +2715,8 @@ describe('lazy import components', () => {
await page.close() await page.close()
}) })
it('does not delay hydration of components named after modifiers', async () => { it('does not delay hydration of components named after modifiers', async () => {
const { page } = await renderPage('/lazy-import-components') expect(html).toContain('This fake lazy event should be visible!')
await page.waitForLoadState('networkidle') expect(html).not.toContain('This fake lazy event shouldn\'t be visible!')
expect(await page.locator('body').getByText('This fake lazy event should be visible!').all()).toHaveLength(1)
expect(await page.locator('body').getByText('This fake lazy event shouldn\'t be visible!').all()).toHaveLength(0)
await page.close()
}) })
}) })