aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKlaus Hartl <klaus.hartl@googlemail.com>2008-10-06 21:35:32 +0000
committerKlaus Hartl <klaus.hartl@googlemail.com>2008-10-06 21:35:32 +0000
commiteb3e6499bfc716def73436a5e6d5b591130464a5 (patch)
tree33b6e2591ca72ea5183857d3e2839bd76efb81fe /tests
parent2f8d6547f283cad858656d00e4bddb434fc8e5e3 (diff)
downloadjquery-ui-eb3e6499bfc716def73436a5e6d5b591130464a5.tar.gz
jquery-ui-eb3e6499bfc716def73436a5e6d5b591130464a5.zip
UI Tabs: fixed queued tests, review
Diffstat (limited to 'tests')
-rw-r--r--tests/tabs.js24
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/tabs.js b/tests/tabs.js
index c08adcc42..685d5ab4f 100644
--- a/tests/tabs.js
+++ b/tests/tabs.js
@@ -3,12 +3,14 @@
*/
(function($) {
+// need to wait a bit for the pseudo animation...
function defer(defered, ms) {
- // wait a bit for the pseudo animation...
- stop();
+ var queue = defer.queue || (defer.queue = []);
+ if (!queue.length) stop();
+ queue.push(defered);
setTimeout(function() {
- defered();
- start();
+ queue.shift()();
+ if (!queue.length) start();
}, ms || 100);
}
@@ -193,27 +195,29 @@ module('tabs: Tickets');
});
test('panel containing inline style, #????', function() {
- expect(2);
+ expect(3);
var inlineStyle = function(property) {
- return document.getElementById('inline-style').style[property];
+ return $('#inline-style')[0].style[property];
};
var expected = inlineStyle('height');
var el = $('#tabs2 > ul').tabs();
- equals(inlineStyle('height'), expected, 'should not remove inline style after init');
+ equals(inlineStyle('height'), expected, 'init should not remove inline style');
el.tabs('select', 1);
defer(function() {
- equals(inlineStyle('height'), expected, 'should not remove inline style after tabs select');
+ equals(inlineStyle('height'), expected, 'show tab should not remove inline style');
+
el.tabs('select', 0);
defer(function() {
- equals(inlineStyle('height'), expected, 'should not remove inline style after tabs select');
+ equals(inlineStyle('height'), expected, 'hide tab should not remove inline style');
});
+
});
});
-
+
// test('', function() {
// expect(0);
//