Nuxt/test/fixtures/basic/pages/noloading.vue
Jonas Galvez de5b36a574 loading: false e2e test fix (#3635)
*  hotfix

* Fixed manual loading test

* Disable waitFor() test due to random failure in appveyor
2018-08-06 20:42:26 +02:00

28 lines
451 B
Vue

<template>
<div>
<h1>{{ name }}</h1>
<p>{{ loaded }}</p>
</div>
</template>
<script>
export default {
loading: false,
asyncData() {
return new Promise((resolve) => {
setTimeout(() => resolve({
loaded: false,
name: 'Nuxt.js'
}), 10)
})
},
mounted() {
this.$nuxt.$loading.finish()
setTimeout(() => {
this.$nuxt.$loading.start()
this.loaded = true
}, 1500)
}
}
</script>