Guest User

Untitled

a guest
Jul 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. it('should set next page 2 to current page when click the Next Button', () => {
  2. const paginator = shallowMount(Paginator)
  3. let button = paginator.find('.paginator__next-btn')
  4. button.trigger('click')
  5. expect(paginator.vm.currentPage).toBe(2)
  6. })
  7.  
  8. it('should set previous page 3 to current page when click the Previous Button', () => {
  9. const paginator = shallowMount(Paginator)
  10. paginator.setData({
  11. currentPage: 4
  12. })
  13. let button = paginator.find('.paginator__previous-btn')
  14. button.trigger('click')
  15. expect(paginator.vm.currentPage).toBe(3)
  16. })
Add Comment
Please, Sign In to add comment