Skip to content
Permalink
Browse files

tabs: core ajax unit test - more refactoring, seems IE7 needs a quick…

… setTimeout for the first async test to work on first load
  • Loading branch information
rdworth committed Apr 2, 2010
1 parent 178c3b5 commit 9ba45f3b76bba7daeb341b2c44fc1ad17ac412ab
Showing with 15 additions and 15 deletions.
  1. +15 −15 tests/unit/tabs/tabs_core.js
@@ -35,21 +35,21 @@ test('ajax', function() {
selected: 2,
load: function() {
// spinner: default spinner
start();
stop();
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();
}
});
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);
}
});

0 comments on commit 9ba45f3

Please sign in to comment.
You can’t perform that action at this time.