mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix: add nuxt load indicator to fixture
This commit is contained in:
parent
0646244a30
commit
23b1af766b
@ -642,8 +642,6 @@ describe('pages', () => {
|
||||
const { page } = await renderPage('/')
|
||||
await page.getByText('to page nuxt load indicator').click()
|
||||
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)
|
||||
@ -653,6 +651,16 @@ describe('pages', () => {
|
||||
isVisible = await page.isVisible(LOAD_INDICATOR_SELECTOR)
|
||||
expect(isVisible).toBe(false)
|
||||
|
||||
await page.goBack()
|
||||
|
||||
await page.waitForSelector(LOAD_INDICATOR_SELECTOR)
|
||||
isVisible = await page.isVisible(LOAD_INDICATOR_SELECTOR)
|
||||
expect(isVisible).toBe(true)
|
||||
|
||||
await page.waitForSelector(LOAD_INDICATOR_SELECTOR, { state: 'hidden' })
|
||||
isVisible = await page.isVisible(LOAD_INDICATOR_SELECTOR)
|
||||
expect(isVisible).toBe(false)
|
||||
|
||||
await page.close()
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user