- fix Paginator.spec.js, PanelMenu.spec.js
parent
d7bd83b70a
commit
305752ef3c
|
@ -20,9 +20,9 @@ describe('Paginator.vue', () => {
|
|||
|
||||
it('should exist', () => {
|
||||
expect(wrapper.find('.p-paginator.p-component').exists()).toBe(true);
|
||||
expect(wrapper.findAll('.p-paginator-page.p-paginator-element').length).toBe(5);
|
||||
expect(wrapper.find('.p-dropdown.p-component').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-dropdown-label').text()).toBe('10');
|
||||
expect(wrapper.findAll('.p-paginator-page').length).toBe(5);
|
||||
expect(wrapper.find('.p-select.p-component').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-select-label').text()).toBe('10');
|
||||
expect(wrapper.find('.p-paginator-first').classes()).toContain('p-disabled');
|
||||
expect(wrapper.find('.p-paginator-prev').classes()).toContain('p-disabled');
|
||||
expect(wrapper.vm.pageCount).toBe(12);
|
||||
|
@ -31,8 +31,8 @@ describe('Paginator.vue', () => {
|
|||
it('show jump to the end', async () => {
|
||||
await wrapper.vm.changePageToLast({ preventDefault: () => {} });
|
||||
|
||||
expect(wrapper.findAll('.p-paginator-page.p-paginator-element')[4].classes()).toContain('p-highlight');
|
||||
expect(wrapper.findAll('.p-paginator-page.p-paginator-element')[4].text()).toBe('12');
|
||||
expect(wrapper.findAll('.p-paginator-page')[4].classes()).toContain('p-paginator-page-selected');
|
||||
expect(wrapper.findAll('.p-paginator-page')[4].text()).toBe('12');
|
||||
expect(wrapper.find('.p-paginator-next').classes()).toContain('p-disabled');
|
||||
expect(wrapper.find('.p-paginator-last').classes()).toContain('p-disabled');
|
||||
});
|
||||
|
@ -46,6 +46,6 @@ describe('Paginator.vue', () => {
|
|||
|
||||
await wrapper.setProps({ rows: 20 });
|
||||
|
||||
expect(wrapper.find('.p-dropdown-label').text()).toBe('20');
|
||||
expect(wrapper.find('.p-select-label').text()).toBe('20');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -61,9 +61,9 @@ describe('PanelMenu', () => {
|
|||
|
||||
it('should exist', () => {
|
||||
expect(wrapper.find('.p-panelmenu.p-component').exists()).toBe(true);
|
||||
expect(wrapper.findAll('.p-menuitem').length).toBe(6);
|
||||
expect(wrapper.findAll('.p-toggleable-content').length).toBe(7);
|
||||
expect(wrapper.findAll('.p-submenu-list').length).toBe(3);
|
||||
expect(wrapper.findAll('.p-panelmenu-item').length).toBe(6);
|
||||
expect(wrapper.findAll('.p-panelmenu-item-content').length).toBe(6);
|
||||
expect(wrapper.findAll('.p-panelmenu-submenu').length).toBe(3);
|
||||
});
|
||||
|
||||
it('should update expandedKeys', async () => {
|
||||
|
|
Loading…
Reference in New Issue