mock up missing elements in the tests

This commit is contained in:
Jan-Christoph Borchardt 2015-03-26 17:10:59 +01:00
parent e7dcc01017
commit d1db727d1f
2 changed files with 5 additions and 2 deletions

View 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;

View 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');