test: Add children fixPrepatch example

This commit is contained in:
Atinux 2017-10-31 18:33:46 +01:00
parent 8318ce7510
commit dc7d4bfab7
7 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<template>
<div>
<nuxt/>
<ul>
<li><nuxt-link data-test-id="patch" to="/patch">/patch</nuxt-link></li>
<li><nuxt-link data-test-id="patch-id-1" to="/patch/1">/patch/1</nuxt-link></li>
<li><nuxt-link data-test-id="patch-id-2" to="/patch/2">/patch/2</nuxt-link></li>
<li><nuxt-link data-test-id="patch-id-child" to="/patch/2/child">/patch/2/child</nuxt-link></li>
<li><nuxt-link data-test-id="patch-id-2-child-1" to="/patch/2/child/1">/patch/2/child/1</nuxt-link></li>
<li><nuxt-link data-test-id="patch-id-2-child-1" to="/patch/2/child/1?query=true">/patch/2/child/1?query=true</nuxt-link></li>
</ul>
</div>
</template>

17
test/fixtures/children/pages/patch.vue vendored Normal file
View File

@ -0,0 +1,17 @@
<template>
<div>
<h1>patch: {{ date }}</h1>
<nuxt-child/>
</div>
</template>
<script>
export default {
layout: 'patch',
asyncData() {
return {
date: Date.now()
}
}
}
</script>

View File

@ -0,0 +1,16 @@
<template>
<div>
<h2>_id: {{ date }}</h2>
<nuxt-child/>
</div>
</template>
<script>
export default {
asyncData() {
return {
date: Date.now()
}
}
}
</script>

View File

@ -0,0 +1,16 @@
<template>
<div>
<h3>child: {{ date }}</h3>
<nuxt-child/>
</div>
</template>
<script>
export default {
asyncData() {
return {
date: Date.now()
}
}
}
</script>

View File

@ -0,0 +1,13 @@
<template>
<h4>_id: {{ date }}</h4>
</template>
<script>
export default {
asyncData() {
return {
date: Date.now()
}
}
}
</script>

View File

@ -0,0 +1,3 @@
<template>
<h3>Index</h3>
</template>

View File

@ -0,0 +1,3 @@
<template>
<h2>Index</h2>
</template>