aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/tests/specs/jquery.contactsmenuSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/tests/specs/jquery.contactsmenuSpec.js')
-rw-r--r--core/js/tests/specs/jquery.contactsmenuSpec.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/js/tests/specs/jquery.contactsmenuSpec.js b/core/js/tests/specs/jquery.contactsmenuSpec.js
index c6807c850a9..62aaef89edc 100644
--- a/core/js/tests/specs/jquery.contactsmenuSpec.js
+++ b/core/js/tests/specs/jquery.contactsmenuSpec.js
@@ -1,11 +1,6 @@
/**
- * Copyright (c) 2017 Georg Ehrke <oc.list@georgehrke.com>
- *
- * This file is licensed under the Affero General Public License version 3
- * or later.
- *
- * See the COPYING-README file.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
describe('jquery.contactsMenu tests', function() {
@@ -123,6 +118,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" 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();
@@ -154,6 +150,7 @@ describe('jquery.contactsMenu tests', function() {
expect(fakeServer.requests[0].url).toEqual('http://localhost/index.php/contactsmenu/findOne');
$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" 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();
@@ -178,6 +175,7 @@ describe('jquery.contactsMenu tests', function() {
expect(fakeServer.requests[0].url).toEqual('http://localhost/index.php/contactsmenu/findOne');
$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" 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();
@@ -197,6 +195,7 @@ describe('jquery.contactsMenu tests', function() {
expect(fakeServer.requests[0].url).toEqual('http://localhost/index.php/contactsmenu/findOne');
$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" 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();
@@ -216,6 +215,7 @@ describe('jquery.contactsMenu tests', function() {
expect(fakeServer.requests[0].url).toEqual('http://localhost/index.php/contactsmenu/findOne');
$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" 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();