mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
chore: begin response logging before click
This commit is contained in:
parent
7bdfc6cc86
commit
1fbe165da5
@ -2693,10 +2693,11 @@ describe('lazy import components', () => {
|
||||
it('respects custom delayed hydration triggers', async () => {
|
||||
const { page } = await renderPage('/lazy-import-components')
|
||||
await page.waitForLoadState('networkidle')
|
||||
await page.locator('#lazyevent2').click()
|
||||
await page.waitForResponse(response =>
|
||||
const resp = page.waitForResponse(response =>
|
||||
response.status() === 200 && response.text().then(text => text.includes('This shouldn\'t be visible at first with events!')),
|
||||
)
|
||||
await page.locator('#lazyevent2').click()
|
||||
await resp
|
||||
expect(await page.locator('body').getByText('This should be visible at first with events!').all()).toHaveLength(1)
|
||||
expect(await page.locator('body').getByText('This shouldn\'t be visible at first with events!').all()).toHaveLength(1)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user