diff options
author | Klaus Hartl <klaus.hartl@googlemail.com> | 2008-10-06 21:35:32 +0000 |
---|---|---|
committer | Klaus Hartl <klaus.hartl@googlemail.com> | 2008-10-06 21:35:32 +0000 |
commit | eb3e6499bfc716def73436a5e6d5b591130464a5 (patch) | |
tree | 33b6e2591ca72ea5183857d3e2839bd76efb81fe /tests | |
parent | 2f8d6547f283cad858656d00e4bddb434fc8e5e3 (diff) | |
download | jquery-ui-eb3e6499bfc716def73436a5e6d5b591130464a5.tar.gz jquery-ui-eb3e6499bfc716def73436a5e6d5b591130464a5.zip |
UI Tabs: fixed queued tests, review
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tabs.js | 24 |
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); // |