Skip to content

Commit

Permalink
test: use scrollIntoView instead of scroll to fix the e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorainville committed Mar 16, 2018
1 parent 94adbdd commit 255117d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions demo/src/components/MyTour.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,17 @@ export default {
],
callbacks: {
onPreviousStep: this.myCustomPreviousStepCallback,
onNextStep: this.myCustomNextStepCallback,
onStop: () => {
window.scroll({
top: 0,
behavior: 'smooth'
})
}
onNextStep: this.myCustomNextStepCallback
}
}
},
mounted: function () {
this.$tours['myTour'].start()
// A dynamically added onStop callback
this.callbacks.onStop = () => {
document.querySelector('#v-step-0').scrollIntoView({behavior: 'smooth'})
}
},
methods: {
nextStep () {
Expand Down

0 comments on commit 255117d

Please sign in to comment.