diff options
author | Louis Chemineau <louis@chmn.me> | 2022-01-17 20:09:35 +0300 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2022-01-18 13:03:01 +0300 |
commit | f752888d9168431daa5d8f63a1993252b88d2dd3 (patch) | |
tree | 9cab201e0f9d3f90e8a105adfd19de163cd8e6df | |
parent | 16ba2940657973d67877500b283f02b471c812d4 (diff) |
Fix contactmenu tests
Signed-off-by: Louis Chemineau <louis@chmn.me>
-rw-r--r-- | core/js/tests/specs/jquery.contactsmenuSpec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/js/tests/specs/jquery.contactsmenuSpec.js b/core/js/tests/specs/jquery.contactsmenuSpec.js index d0bd9c8dde4..fb2514eb0de 100644 --- a/core/js/tests/specs/jquery.contactsmenuSpec.js +++ b/core/js/tests/specs/jquery.contactsmenuSpec.js @@ -124,7 +124,7 @@ describe('jquery.contactsMenu tests', function() { $selector1.on('load', function() { // FIXME: don't compare HTML one to one but check specific text in the output - expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="mailto:bar%40baz.wtf"><img src="foo.svg"><span>bar@baz.wtf</span></a></li></ul></div>'); + expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded" style="display: block;"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="mailto:bar%40baz.wtf"><img src="foo.svg"><span>bar@baz.wtf</span></a></li></ul></div>'); done(); }); @@ -156,7 +156,7 @@ describe('jquery.contactsMenu tests', function() { $selector1.on('load', function() { // FIXME: don't compare HTML one to one but check specific text in the output - expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="mailto:bar%40baz.wtf"><img src="foo.svg"><span>bar@baz.wtf</span></a></li><li><a href="http://localhost/index.php/apps/contacts"><img src="details.svg"><span>Details</span></a></li></ul></div>'); + expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded" style="display: block;"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="mailto:bar%40baz.wtf"><img src="foo.svg"><span>bar@baz.wtf</span></a></li><li><a href="http://localhost/index.php/apps/contacts"><img src="details.svg"><span>Details</span></a></li></ul></div>'); done(); }); @@ -181,7 +181,7 @@ describe('jquery.contactsMenu tests', function() { $selector1.on('load', function() { // FIXME: don't compare HTML one to one but check specific text in the output - expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="#"><span>No action available</span></a></li></ul></div>'); + expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded" style="display: block;"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="#"><span>No action available</span></a></li></ul></div>'); done(); }); @@ -201,7 +201,7 @@ describe('jquery.contactsMenu tests', function() { $selector1.on('loaderror', function() { // FIXME: don't compare HTML one to one but check specific text in the output - expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="#"><span>Error fetching contact actions</span></a></li></ul></div>'); + expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded" style="display: block;"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="#"><span>Error fetching contact actions</span></a></li></ul></div>'); done(); }); @@ -221,7 +221,7 @@ describe('jquery.contactsMenu tests', function() { $selector1.on('loaderror', function() { // FIXME: don't compare HTML one to one but check specific text in the output - expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="#"><span>No action available</span></a></li></ul></div>'); + expect($appendTo.html().replace(/[\r\n\t]?(\ \ +)?/g, '')).toEqual('<div class="menu popovermenu menu-left contactsmenu-popover loaded" style="display: block;"><ul><li class="hidden"><a><span class="icon-loading-small"></span></a></li><li><a href="#"><span>No action available</span></a></li></ul></div>'); done(); }); |