diff options
author | Klaus Hartl <klaus.hartl@googlemail.com> | 2008-12-22 11:45:29 +0000 |
---|---|---|
committer | Klaus Hartl <klaus.hartl@googlemail.com> | 2008-12-22 11:45:29 +0000 |
commit | 36095fd0a7068e7f23e355b2c305c2a9eb482465 (patch) | |
tree | 2a3ffa3b5e7f3d1b307953b46b4bcafc1915a334 /tests | |
parent | 0fd2e8c91d9f8296aaea9fce7dbcd067fa836581 (diff) | |
download | jquery-ui-36095fd0a7068e7f23e355b2c305c2a9eb482465.tar.gz jquery-ui-36095fd0a7068e7f23e355b2c305c2a9eb482465.zip |
UI Tabs: added a few tests for remove method, still incomplete
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tabs.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/tabs.js b/tests/tabs.js index 5cbd9b705..41d59f060 100644 --- a/tests/tabs.js +++ b/tests/tabs.js @@ -81,7 +81,20 @@ module('tabs'); }); test('remove', function() { - expect(0); + expect(4); + + var el = $('#tabs1 > ul').tabs(); + el.tabs('remove', 0); + equals(el.tabs('length'), 2, 'remove tab'); + equals($('li a[href$="fragment-1"]', el).length, 0, 'remove associated list item'); + equals($('#fragment-1').length, 0, 'remove associated panel'); + + // TODO delete tab -> focus tab to right + // TODO delete last tab -> focus tab to left + + el = $('#tabs2 > ul').tabs({ selected: 1 }); + el.tabs('remove', 1); + equals(el.data('selected.tabs'), 0, 'update selected property'); }); |