aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/tabs/tabs_methods.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/tabs/tabs_methods.js')
-rw-r--r--tests/unit/tabs/tabs_methods.js26
1 files changed, 17 insertions, 9 deletions
diff --git a/tests/unit/tabs/tabs_methods.js b/tests/unit/tabs/tabs_methods.js
index 5cf917550..ec21e2de7 100644
--- a/tests/unit/tabs/tabs_methods.js
+++ b/tests/unit/tabs/tabs_methods.js
@@ -165,16 +165,20 @@ asyncTest( "load", function() {
tabs_state( element, 1, 0, 0, 0, 0 );
});
element.one( "tabsload", function( event, ui ) {
+ // TODO: remove wrapping in 2.0
+ var uiTab = $( ui.tab ),
+ uiPanel = $( ui.panel );
+
var tab = element.find( ".ui-tabs-nav a" ).eq( 3 ),
panelId = tab.attr( "aria-controls" ),
panel = $( "#" + panelId );
ok( !( "originalEvent" in event ), "originalEvent" );
- equals( ui.tab.size(), 1, "tab size" );
- strictEqual( ui.tab[ 0 ], tab[ 0 ], "tab" );
- equals( ui.panel.size(), 1, "panel size" );
- strictEqual( ui.panel[ 0 ], panel[ 0 ], "panel" );
- equals( ui.panel.find( "p" ).length, 1, "panel html" );
+ equals( uiTab.size(), 1, "tab size" );
+ strictEqual( uiTab[ 0 ], tab[ 0 ], "tab" );
+ equals( uiPanel.size(), 1, "panel size" );
+ strictEqual( uiPanel[ 0 ], panel[ 0 ], "panel" );
+ equals( uiPanel.find( "p" ).length, 1, "panel html" );
tabs_state( element, 1, 0, 0, 0, 0 );
setTimeout( tabsload1, 1 );
});
@@ -209,15 +213,19 @@ asyncTest( "load", function() {
tabs_state( element, 0, 0, 0, 1, 0 );
});
element.one( "tabsload", function( event, ui ) {
+ // TODO: remove wrapping in 2.0
+ var uiTab = $( ui.tab ),
+ uiPanel = $( ui.panel );
+
var tab = element.find( ".ui-tabs-nav a" ).eq( 3 ),
panelId = tab.attr( "aria-controls" ),
panel = $( "#" + panelId );
ok( !( "originalEvent" in event ), "originalEvent" );
- equals( ui.tab.size(), 1, "tab size" );
- strictEqual( ui.tab[ 0 ], tab[ 0 ], "tab" );
- equals( ui.panel.size(), 1, "panel size" );
- strictEqual( ui.panel[ 0 ], panel[ 0 ], "panel" );
+ equals( uiTab.size(), 1, "tab size" );
+ strictEqual( uiTab[ 0 ], tab[ 0 ], "tab" );
+ equals( uiPanel.size(), 1, "panel size" );
+ strictEqual( uiPanel[ 0 ], panel[ 0 ], "panel" );
tabs_state( element, 0, 0, 0, 1, 0 );
start();
});