adding test for hiding loading indicator
This commit is contained in:
parent
29419d03cd
commit
1fd13981d4
1 changed files with 24 additions and 1 deletions
25
js/test.js
25
js/test.js
|
@ -1038,7 +1038,7 @@ describe('Alert', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
jsc.property(
|
jsc.property(
|
||||||
'shows a loding message',
|
'shows a loading message',
|
||||||
jsc.array(jsc.elements(alnumString)),
|
jsc.array(jsc.elements(alnumString)),
|
||||||
jsc.array(jsc.elements(alnumString)),
|
jsc.array(jsc.elements(alnumString)),
|
||||||
'integer',
|
'integer',
|
||||||
|
@ -1066,5 +1066,28 @@ describe('Alert', function () {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('hideLoading', function () {
|
||||||
|
before(function () {
|
||||||
|
cleanup();
|
||||||
|
});
|
||||||
|
|
||||||
|
it(
|
||||||
|
'hides the loading message',
|
||||||
|
function() {
|
||||||
|
$('body').html(
|
||||||
|
'<ul class="nav navbar-nav"><li id="loadingindicator" ' +
|
||||||
|
'class="navbar-text"><span class="glyphicon ' +
|
||||||
|
'glyphicon-time" aria-hidden="true"></span> ' +
|
||||||
|
'Loading…</li></ul>'
|
||||||
|
);
|
||||||
|
$('body').addClass('loading');
|
||||||
|
$.PrivateBin.Alert.init();
|
||||||
|
$.PrivateBin.Alert.hideLoading();
|
||||||
|
return !$('body').hasClass('loading') &&
|
||||||
|
$('#loadingindicator').hasClass('hidden');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue