mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
UI Tabs: added a few tests for remove method, still incomplete
This commit is contained in:
parent
0fd2e8c91d
commit
36095fd0a7
@ -81,7 +81,20 @@ module('tabs');
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('remove', function() {
|
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');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user