2011-03-26 19:00:39 +00:00
|
|
|
(function( $ ) {
|
|
|
|
|
|
|
|
module("tabs (deprecated): cache and ajaxoptions");
|
|
|
|
|
|
|
|
test('ajaxOptions', function() {
|
|
|
|
ok(false, "missing test - untested code is broken code.");
|
|
|
|
});
|
|
|
|
|
|
|
|
test('cache', function() {
|
|
|
|
ok(false, "missing test - untested code is broken code.");
|
|
|
|
});
|
|
|
|
|
2011-03-26 19:48:53 +00:00
|
|
|
module("tabs (deprecated): spinner");
|
|
|
|
|
|
|
|
test('spinner', function() {
|
|
|
|
expect(4);
|
|
|
|
stop();
|
|
|
|
|
|
|
|
el = $('#tabs2');
|
|
|
|
|
|
|
|
el.tabs({
|
|
|
|
selected: 2,
|
|
|
|
load: function() {
|
|
|
|
// spinner: default spinner
|
|
|
|
setTimeout(function() {
|
|
|
|
equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
|
|
|
|
equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
|
|
|
|
el.tabs('destroy');
|
|
|
|
el.tabs({
|
|
|
|
selected: 2,
|
|
|
|
spinner: '<img src="spinner.gif" alt="">',
|
|
|
|
load: function() {
|
|
|
|
// spinner: image
|
|
|
|
equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
|
|
|
|
equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
|
|
|
|
start();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}, 1);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2011-03-26 19:00:39 +00:00
|
|
|
}( jQuery ) );
|