Skip to content

Commit

Permalink
test: trying to cover test scrollPositionOnCenter
Browse files Browse the repository at this point in the history
  • Loading branch information
almas committed Aug 8, 2021
1 parent b979c6e commit 0809e4b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions test/unit/specs/Props.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,7 @@ describe('Props', () => {

vm.openMenu()
await vm.$nextTick()
sleep(50)
sleep(51)
const menu = findMenu(wrapper)
if (wrapper.contains('.vue-treeselect__option--selected') && menu.element.scrollHeight > menu.element.clientHeight) {
expect(menu.element.scrollTop).toBeGreaterThan(0)
Expand All @@ -1994,18 +1994,15 @@ describe('Props', () => {
wrapper.setProps({ value: null,
clearOnSelect: true })
vm.localSearch.active = true
sleep(50)
sleep(51)

vm.select(vm.forest.nodeMap.abbb)
sleep(51)
vm.select(vm.forest.nodeMap.abbe)
sleep(51)

vm.closeMenu()
await vm.$nextTick()
sleep(100)
vm.openMenu()
await vm.$nextTick()
wrapper.setProps({ clearOnSelect: false })
sleep(50)
vm.select(vm.forest.nodeMap.abbe)
})
})
})
Expand Down

0 comments on commit 0809e4b

Please sign in to comment.