Skip to content

Commit 9f61853

Browse files
committed
Update pagination.spec.js
1 parent 022996b commit 9f61853

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/components/pagination/pagination.spec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,25 @@ describe('pagination', () => {
374374
wrapper.destroy()
375375
})
376376

377+
it('has correct number of links when `hide-ellipsis` is enabled', async () => {
378+
const wrapper = mount(BPagination, {
379+
propsData: {
380+
hideEllipsis: true,
381+
totalRows: 100,
382+
perPage: 10,
383+
value: 1
384+
}
385+
})
386+
expect(wrapper.element.tagName).toBe('UL')
387+
expect(wrapper.findAll('li').length).toBe(9)
388+
389+
await wrapper.setProps({ value: 5 })
390+
await waitNT(wrapper.vm)
391+
expect(wrapper.findAll('li').length).toBe(9)
392+
393+
wrapper.destroy()
394+
})
395+
377396
it('has attribute aria-controls on page links when prop aria-controls is set', async () => {
378397
const wrapper = mount(BPagination, {
379398
propsData: {

0 commit comments

Comments
 (0)