]> source.dussan.org Git - nextcloud-server.git/commitdiff
mock up missing elements in the tests
authorJan-Christoph Borchardt <hey@jancborchardt.net>
Thu, 26 Mar 2015 16:10:59 +0000 (17:10 +0100)
committerJan-Christoph Borchardt <hey@jancborchardt.net>
Thu, 26 Mar 2015 16:13:50 +0000 (17:13 +0100)
core/js/js.js
core/js/tests/specs/coreSpec.js

index 7a895a22419c2b5b87e856b2150b02efbadc3c24..ad14c2a855aaf9ffdfc7e4dd609b78dd5106f15d 100644 (file)
@@ -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;
index 7d06ac2e7df9c94a49f548af0a62b705a7c008f8..6f7a34d21c8e87caad1712e96fe871700d4288e2 100644 (file)
@@ -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');