fix: add nuxt load indicator to fixture

This commit is contained in:
Peter Buglavecz 2024-11-19 16:24:38 +01:00
parent df749b9b5b
commit 0646244a30
2 changed files with 8 additions and 1 deletions

View File

@ -644,9 +644,15 @@ describe('pages', () => {
await page.waitForFunction(path => window.useNuxtApp?.()._route.fullPath === path, '/nested/xyz')
await page.goBack()
await page.waitForFunction(path => window.useNuxtApp?.()._route.fullPath === path, '/')
await page.waitForSelector(LOAD_INDICATOR_SELECTOR)
let isVisible = await page.isVisible(LOAD_INDICATOR_SELECTOR)
expect(isVisible).toBe(true)
await page.waitForSelector(LOAD_INDICATOR_SELECTOR, { state: 'hidden' })
const isVisible = await page.isVisible(LOAD_INDICATOR_SELECTOR)
isVisible = await page.isVisible(LOAD_INDICATOR_SELECTOR)
expect(isVisible).toBe(false)
await page.close()
})
})

View File

@ -3,6 +3,7 @@
<Head>
<Title>Basic fixture</Title>
</Head>
<NuxtLoadingIndicator :throttle="0" />
<h1>Hello Nuxt 3!</h1>
<div>RuntimeConfig | testConfig: {{ config.public.testConfig }}</div>
<div>Composable | foo: {{ foo }}</div>