diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-10-12 11:07:04 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-10-12 11:07:04 -0400 |
commit | 94221c4e5b11496ef927889e1541d84b5746fb31 (patch) | |
tree | 7ffa63470bd85203ff03f22a4f0769cd62c3c172 /tests | |
parent | 1ee090ea9e03c800a764d992506869384409bdb6 (diff) | |
download | jquery-ui-94221c4e5b11496ef927889e1541d84b5746fb31.tar.gz jquery-ui-94221c4e5b11496ef927889e1541d84b5746fb31.zip |
Tabs: Use aria-controls instead of the anchor's href to match against location.hash. Fixes #8660 - Tabs: Set initial active tab from location hash for ajax tabs.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/tabs/tabs_options.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/unit/tabs/tabs_options.js b/tests/unit/tabs/tabs_options.js index 5a90ff895..1b468f2b6 100644 --- a/tests/unit/tabs/tabs_options.js +++ b/tests/unit/tabs/tabs_options.js @@ -7,7 +7,7 @@ var disabled = TestHelpers.tabs.disabled, module( "tabs: options" ); test( "{ active: default }", function() { - expect( 4 ); + expect( 6 ); var element = $( "#tabs1" ).tabs(); equal( element.tabs( "option", "active" ), 0, "should be 0 by default" ); @@ -19,6 +19,12 @@ test( "{ active: default }", function() { equal( element.tabs( "option", "active" ), 2, "should be 2 based on URL" ); state( element, 0, 0, 1 ); element.tabs( "destroy" ); + + location.hash = "#custom-id"; + element = $( "#tabs2" ).tabs(); + equal( element.tabs( "option", "active" ), 3, "should be 3 based on URL" ); + state( element, 0, 0, 0, 1, 0 ); + element.tabs( "destroy" ); location.hash = "#"; }); |