Skip to content

Commit

Permalink
test: Add children fixPrepatch example
Browse files Browse the repository at this point in the history
  • Loading branch information
Atinux committed Oct 31, 2017
1 parent 8318ce7 commit dc7d4bf
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/fixtures/children/layouts/patch.vue
Original file line number Diff line number Diff line change
@@ -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 changes: 17 additions & 0 deletions test/fixtures/children/pages/patch.vue
Original file line number Diff line number Diff line change
@@ -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>
16 changes: 16 additions & 0 deletions test/fixtures/children/pages/patch/_id.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<div>
<h2>_id: {{ date }}</h2>
<nuxt-child/>
</div>
</template>

<script>
export default {
asyncData() {
return {
date: Date.now()
}
}
}
</script>
16 changes: 16 additions & 0 deletions test/fixtures/children/pages/patch/_id/child.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<div>
<h3>child: {{ date }}</h3>
<nuxt-child/>
</div>
</template>

<script>
export default {
asyncData() {
return {
date: Date.now()
}
}
}
</script>
13 changes: 13 additions & 0 deletions test/fixtures/children/pages/patch/_id/child/_slug.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<h4>_id: {{ date }}</h4>
</template>

<script>
export default {
asyncData() {
return {
date: Date.now()
}
}
}
</script>
3 changes: 3 additions & 0 deletions test/fixtures/children/pages/patch/_id/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<h3>Index</h3>
</template>
3 changes: 3 additions & 0 deletions test/fixtures/children/pages/patch/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<h2>Index</h2>
</template>

0 comments on commit dc7d4bf

Please sign in to comment.