From 5c61852c2522de25edc8d7d2fbdb9d190053a4b3 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 24 Apr 2017 08:07:02 +0200 Subject: [PATCH] Fix failing contacts menu js test data When we test wheter action menus in the contacts menu close when clicking other ones, we have to provide test data that actually causes the view to render the menu. Signed-off-by: Christoph Wurst --- core/js/tests/specs/contactsmenuSpec.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/core/js/tests/specs/contactsmenuSpec.js b/core/js/tests/specs/contactsmenuSpec.js index 1db9a6a9554..8749275241a 100644 --- a/core/js/tests/specs/contactsmenuSpec.js +++ b/core/js/tests/specs/contactsmenuSpec.js @@ -193,6 +193,11 @@ describe('Contacts menu', function() { hyperlink: 'mailto:deboraoliver%40centrexin.com' }, actions: [ + { + title: 'Info', + icon: 'icon-info', + hyperlink: 'https:\/\/localhost\/index.php\/apps\/contacts' + }, { title: 'Details', icon: 'icon-info', @@ -210,6 +215,11 @@ describe('Contacts menu', function() { hyperlink: 'mailto:ceciliasoto%40essensia.com' }, actions: [ + { + title: 'Info', + icon: 'icon-info', + hyperlink: 'https://localhost\/index.php\/apps\/contacts' + }, { title: 'Details', icon: 'icon-info', @@ -228,8 +238,8 @@ describe('Contacts menu', function() { expect($menuEl.html()).toContain('Show all contacts …'); // Both menus are closed at the beginning - expect($menuEl.find('.contact').eq(0).find('.menu').is(':visible')).toBeFalsy(); - expect($menuEl.find('.contact').eq(1).find('.menu').is(':visible')).toBeFalsy(); + expect($menuEl.find('.contact').eq(0).find('.menu').is(':visible')).toBe(false); + expect($menuEl.find('.contact').eq(1).find('.menu').is(':visible')).toBe(false); // Open the first one $menuEl.find('.contact').eq(0).find('.other-actions').click();