mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +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)
|
||||
await hook
|
||||
expect(loading.show).toBe(true)
|
||||
await page.waitForFunction(`document.querySelector('p').innerText === 'true'`)
|
||||
expect(await page.$text('p')).toBe('true')
|
||||
loading = await page.nuxt.loadingData()
|
||||
expect(loading.show).toBe(true)
|
||||
await page.waitForFunction(
|
||||
`$nuxt.$loading.$data.show === false`
|
||||
)
|
||||
await page.waitForFunction(
|
||||
`document.querySelector('p').innerText === 'true'`
|
||||
)
|
||||
})
|
||||
|
||||
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() {
|
||||
this.$nuxt.$loading.finish()
|
||||
setTimeout(() => {
|
||||
this.$nuxt.$loading.finish()
|
||||
setTimeout(() => {
|
||||
// Re-enable loader as we move on
|
||||
// to normal pages in the test
|
||||
this.$nuxt.$loading.start()
|
||||
this.loaded = true
|
||||
}, 1500)
|
||||
this.$nuxt.$loading.start()
|
||||
this.loaded = true
|
||||
}, 1500)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user