diff options
author | Klaus Hartl <klaus.hartl@googlemail.com> | 2009-02-13 23:05:16 +0000 |
---|---|---|
committer | Klaus Hartl <klaus.hartl@googlemail.com> | 2009-02-13 23:05:16 +0000 |
commit | f3feb25712092f455b24476b2f0528c2901f357f (patch) | |
tree | 00171f0d0f0c2ff0cf2fb73835f3b87d818d72a7 /tests | |
parent | 82d7c67bd345fe5e47ff9e9f28656daab7acf776 (diff) | |
download | jquery-ui-f3feb25712092f455b24476b2f0528c2901f357f.tar.gz jquery-ui-f3feb25712092f455b24476b2f0528c2901f357f.zip |
Tabs: mouseover/focus handling for added tabs, plus test, fixes #4097 as well as focus/blur handling when using keyboard
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/tabs/tabs_methods.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/tabs/tabs_methods.js b/tests/unit/tabs/tabs_methods.js index 2fc309b57..61ddee642 100644 --- a/tests/unit/tabs/tabs_methods.js +++ b/tests/unit/tabs/tabs_methods.js @@ -43,6 +43,18 @@ test('disable', function() { }); test('add', function() { + expect(3); + + el = $('#tabs1').tabs(); + el.tabs('add', "#new", 'New'); + + var added = $('li:last', el).simulate('mouseover'); + ok(added.is('.ui-state-hover'), 'should add mouseover handler to added tab'); + added.simulate('mouseout'); + var other = $('li:first', el).simulate('mouseover'); + ok(other.is('.ui-state-hover'), 'should not remove mouseover handler from existing tab'); + other.simulate('mouseout'); + ok(false, "missing test - untested code is broken code."); }); |