mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
loading: false
e2e test fix (#3635)
* hotfix * Fixed manual loading test * Disable waitFor() test due to random failure in appveyor
This commit is contained in:
parent
e740f51efa
commit
de5b36a574
@ -33,10 +33,12 @@ describe('basic browser', () => {
|
|||||||
expect(loading.show).toBe(true)
|
expect(loading.show).toBe(true)
|
||||||
await hook
|
await hook
|
||||||
expect(loading.show).toBe(true)
|
expect(loading.show).toBe(true)
|
||||||
await page.waitForFunction(`document.querySelector('p').innerText === 'true'`)
|
await page.waitForFunction(
|
||||||
expect(await page.$text('p')).toBe('true')
|
`$nuxt.$loading.$data.show === false`
|
||||||
loading = await page.nuxt.loadingData()
|
)
|
||||||
expect(loading.show).toBe(true)
|
await page.waitForFunction(
|
||||||
|
`document.querySelector('p').innerText === 'true'`
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('/stateless', async () => {
|
test('/stateless', async () => {
|
||||||
|
10
test/fixtures/basic/pages/noloading.vue
vendored
10
test/fixtures/basic/pages/noloading.vue
vendored
@ -17,14 +17,10 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.$nuxt.$loading.finish()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$nuxt.$loading.finish()
|
this.$nuxt.$loading.start()
|
||||||
setTimeout(() => {
|
this.loaded = true
|
||||||
// Re-enable loader as we move on
|
|
||||||
// to normal pages in the test
|
|
||||||
this.$nuxt.$loading.start()
|
|
||||||
this.loaded = true
|
|
||||||
}, 1500)
|
|
||||||
}, 1500)
|
}, 1500)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user