Skip to content
Permalink
Browse files

UI Tabs: added a few tests for remove method, still incomplete

  • Loading branch information
Klaus Hartl
Klaus Hartl committed Dec 22, 2008
1 parent 0fd2e8c commit 36095fd0a7068e7f23e355b2c305c2a9eb482465
Showing with 14 additions and 1 deletion.
  1. +14 −1 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');

});

0 comments on commit 36095fd

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