Skip to content

Commit a205c2c

Browse files
committed
Tabs: Moved tests out of tickets file.
1 parent bd6672d commit a205c2c

File tree

5 files changed

+29
-40
lines changed

5 files changed

+29
-40
lines changed

tests/unit/tabs/tabs.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
<script src="tabs_events.js"></script>
2525
<script src="tabs_methods.js"></script>
2626
<script src="tabs_options.js"></script>
27-
<script src="tabs_tickets.js"></script>
2827

2928
<script>
3029
function tabs_state( tabs ) {

tests/unit/tabs/tabs_core.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,32 @@ test( "accessibility", function() {
6363
// TODO: add tests
6464
});
6565

66+
test( "#3627 - Ajax tab with url containing a fragment identifier fails to load", function() {
67+
expect( 1 );
68+
69+
var element = $( "#tabs2" ).tabs({
70+
active: 2,
71+
beforeLoad: function( event, ui ) {
72+
event.preventDefault();
73+
ok( /test.html$/.test( ui.ajaxSettings.url ), "should ignore fragment identifier" );
74+
}
75+
});
76+
});
77+
78+
test( "#4033 - IE expands hash to full url and misinterprets tab as ajax", function() {
79+
expect( 2 );
80+
81+
var element = $( "<div><ul><li><a href='#tab'>Tab</a></li></ul><div id='tab'></div></div>" );
82+
element.appendTo( "#main" );
83+
element.tabs({
84+
beforeLoad: function( event, ui ) {
85+
event.preventDefault();
86+
ok( false, 'should not be an ajax tab');
87+
}
88+
});
89+
90+
equals( element.find( ".ui-tabs-nav a" ).attr( "aria-controls" ), "tab", "aria-contorls attribute is correct" );
91+
tabs_state( element, 1 );
92+
});
93+
6694
}( jQuery ) );

tests/unit/tabs/tabs_deprecated.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<script src="tabs_events.js"></script>
2323
<script src="tabs_methods.js"></script>
2424
<script src="tabs_options.js"></script>
25-
<script src="tabs_tickets.js"></script>
2625
<script src="tabs_deprecated.js"></script>
2726

2827
<script>

tests/unit/tabs/tabs_options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,4 @@ test( "{ event: custom }", function() {
210210

211211
// TODO: add animation tests
212212

213-
})(jQuery);
213+
}( jQuery ) );

tests/unit/tabs/tabs_tickets.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)