summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2015-03-26 17:10:59 +0100
committerJan-Christoph Borchardt <hey@jancborchardt.net>2015-03-26 17:13:50 +0100
commitd1db727d1fba96dac59b42a62c49c32091216ef2 (patch)
treec804d5c9ed5dc9c909972be75a68438c41209cb9 /core/js
parente7dcc01017f90af72df952648b07b707b5a9ac75 (diff)
downloadnextcloud-server-d1db727d1fba96dac59b42a62c49c32091216ef2.tar.gz
nextcloud-server-d1db727d1fba96dac59b42a62c49c32091216ef2.zip
mock up missing elements in the tests
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js2
-rw-r--r--core/js/tests/specs/coreSpec.js5
2 files changed, 5 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 7a895a22419..ad14c2a855a 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1197,7 +1197,7 @@ function initCore() {
setupMainMenu();
// move triangle of apps dropdown to align with app name triangle
- // 68 is the additional offset coming from the logo width
+ // 2 is the additional offset between the triangles
if($('#navigation').length) {
$('#header #owncloud + .menutoggle').one('click', function(){
var caretPosition = $('.header-appname + .icon-caret').offset().left - 2;
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js
index 7d06ac2e7df..6f7a34d21c8 100644
--- a/core/js/tests/specs/coreSpec.js
+++ b/core/js/tests/specs/coreSpec.js
@@ -418,7 +418,10 @@ describe('Core base tests', function() {
beforeEach(function() {
clock = sinon.useFakeTimers();
$('#testArea').append('<div id="header">' +
- '<a class="menutoggle" href="#"></a>' +
+ '<a class="menutoggle" href="#">' +
+ '<h1 class="header-appname"></h1>' +
+ '<div class="icon-caret"></div>' +
+ '</a>' +
'</div>' +
'<div id="navigation"></div>');
$toggle = $('#header').find('.menutoggle');