Skip to content
Permalink
Browse files

Tabs: Moved tests out of tickets file.

  • Loading branch information...
scottgonzalez committed May 10, 2011
1 parent bd6672d commit a205c2c8b8498f82f87a723f49c1fe746e47c667
@@ -24,7 +24,6 @@
<script src="tabs_events.js"></script>
<script src="tabs_methods.js"></script>
<script src="tabs_options.js"></script>
<script src="tabs_tickets.js"></script>

<script>
function tabs_state( tabs ) {
@@ -63,4 +63,32 @@ test( "accessibility", function() {
// TODO: add tests
});

test( "#3627 - Ajax tab with url containing a fragment identifier fails to load", function() {
expect( 1 );

var element = $( "#tabs2" ).tabs({
active: 2,
beforeLoad: function( event, ui ) {
event.preventDefault();
ok( /test.html$/.test( ui.ajaxSettings.url ), "should ignore fragment identifier" );
}
});
});

test( "#4033 - IE expands hash to full url and misinterprets tab as ajax", function() {
expect( 2 );

var element = $( "<div><ul><li><a href='#tab'>Tab</a></li></ul><div id='tab'></div></div>" );
element.appendTo( "#main" );
element.tabs({
beforeLoad: function( event, ui ) {
event.preventDefault();
ok( false, 'should not be an ajax tab');
}
});

equals( element.find( ".ui-tabs-nav a" ).attr( "aria-controls" ), "tab", "aria-contorls attribute is correct" );
tabs_state( element, 1 );
});

}( jQuery ) );
@@ -22,7 +22,6 @@
<script src="tabs_events.js"></script>
<script src="tabs_methods.js"></script>
<script src="tabs_options.js"></script>
<script src="tabs_tickets.js"></script>
<script src="tabs_deprecated.js"></script>

<script>
@@ -210,4 +210,4 @@ test( "{ event: custom }", function() {

// TODO: add animation tests

})(jQuery);
}( jQuery ) );

This file was deleted.

0 comments on commit a205c2c

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