- fix Menu.spec.js, Menubar.spec.js, Message.spec.js

pull/6170/head
uros 2024-08-01 20:29:19 +02:00
parent 943e8c4962
commit 09aee632b3
3 changed files with 10 additions and 10 deletions

View File

@ -57,11 +57,11 @@ describe('Menu.vue', () => {
it('should exist', () => {
expect(wrapper.find('.p-menu.p-component').exists()).toBe(true);
expect(wrapper.findAll('.p-submenu-header').length).toBe(2);
expect(wrapper.findAll('.p-submenu-header')[0].text()).toBe('Options');
expect(wrapper.findAll('.p-menuitem').length).toBe(4);
expect(wrapper.findAll('.p-menuitem')[0].find('span.p-menuitem-text').text()).toBe('Update');
expect(wrapper.findAll('.p-menuitem')[2].find('a').attributes().href).toBe('https://vuejs.org/');
expect(wrapper.findAll('.p-menu-submenu-label').length).toBe(2);
expect(wrapper.findAll('.p-menu-submenu-label')[0].text()).toBe('Options');
expect(wrapper.findAll('.p-menu-item').length).toBe(4);
expect(wrapper.findAll('.p-menu-item')[0].find('span.p-menu-item-label').text()).toBe('Update');
expect(wrapper.findAll('.p-menu-item')[2].find('a').attributes().href).toBe('https://vuejs.org/');
});
it('should popup work', async () => {

View File

@ -60,10 +60,10 @@ describe('Menubar.vue', () => {
it('should exist', () => {
expect(wrapper.find('.p-menubar.p-component').exists()).toBe(true);
expect(wrapper.find('.p-menubar-root-list').exists()).toBe(true);
expect(wrapper.findAll('ul.p-submenu-list').length).toBe(2);
expect(wrapper.findAll('ul.p-submenu-list')[0].findAll('li.p-menuitem')[0].find('.p-menuitem-text').text()).toBe('New');
expect(wrapper.findAll('li.p-menuitem').length).toBe(7);
expect(wrapper.findAll('li.p-menuitem-separator').length).toBe(1);
expect(wrapper.findAll('ul.p-menubar-submenu').length).toBe(2);
expect(wrapper.findAll('ul.p-menubar-submenu')[0].findAll('li.p-menubar-item')[0].find('.p-menubar-item-label').text()).toBe('New');
expect(wrapper.findAll('li.p-menubar-item').length).toBe(7);
expect(wrapper.findAll('li.p-menubar-separator').length).toBe(1);
});
it('should slot visible', () => {

View File

@ -29,7 +29,7 @@ describe('Message.vue', () => {
});
it('should have custom close icon if provided', async () => {
await wrapper.setProps({ closeIcon: 'pi pi-discord' });
await wrapper.setProps({ closeIcon: 'pi pi-discord', closable: true });
const icon = wrapper.find('.p-message-close-icon');
expect(icon.classes()).toContain('pi-discord');