From 09aee632b3703611abfb66a582a612ff8aa9c80d Mon Sep 17 00:00:00 2001 From: uros Date: Thu, 1 Aug 2024 20:29:19 +0200 Subject: [PATCH] - fix Menu.spec.js, Menubar.spec.js, Message.spec.js --- packages/primevue/src/menu/Menu.spec.js | 10 +++++----- packages/primevue/src/menubar/Menubar.spec.js | 8 ++++---- packages/primevue/src/message/Message.spec.js | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/primevue/src/menu/Menu.spec.js b/packages/primevue/src/menu/Menu.spec.js index 653d9d82a..eef41f3b2 100644 --- a/packages/primevue/src/menu/Menu.spec.js +++ b/packages/primevue/src/menu/Menu.spec.js @@ -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 () => { diff --git a/packages/primevue/src/menubar/Menubar.spec.js b/packages/primevue/src/menubar/Menubar.spec.js index 9c3e39c65..066abe9ba 100644 --- a/packages/primevue/src/menubar/Menubar.spec.js +++ b/packages/primevue/src/menubar/Menubar.spec.js @@ -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', () => { diff --git a/packages/primevue/src/message/Message.spec.js b/packages/primevue/src/message/Message.spec.js index 523fbd47b..6b82c616b 100644 --- a/packages/primevue/src/message/Message.spec.js +++ b/packages/primevue/src/message/Message.spec.js @@ -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');