2015-04-06 19:01:13 +00:00
|
|
|
define( [
|
2016-04-06 13:48:50 +00:00
|
|
|
"qunit",
|
2015-04-06 19:01:13 +00:00
|
|
|
"jquery",
|
2020-05-16 07:16:24 +00:00
|
|
|
"lib/helper",
|
2015-04-07 14:55:52 +00:00
|
|
|
"./helper",
|
2015-07-15 02:11:35 +00:00
|
|
|
"ui/widgets/tabs"
|
2020-05-16 07:16:24 +00:00
|
|
|
], function( QUnit, $, helper, testHelper ) {
|
2021-06-06 22:58:12 +00:00
|
|
|
"use strict";
|
2009-02-02 14:36:08 +00:00
|
|
|
|
2015-04-07 14:30:07 +00:00
|
|
|
var disabled = testHelper.disabled,
|
|
|
|
state = testHelper.state;
|
2012-04-19 16:53:06 +00:00
|
|
|
|
2020-05-16 07:16:24 +00:00
|
|
|
QUnit.module( "tabs: methods", { afterEach: helper.moduleAfterEach } );
|
2010-09-29 17:32:43 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "destroy", function( assert ) {
|
|
|
|
assert.expect( 2 );
|
2015-04-06 19:01:13 +00:00
|
|
|
assert.domEqual( "#tabs1", function() {
|
2011-05-09 21:41:43 +00:00
|
|
|
$( "#tabs1" ).tabs().tabs( "destroy" );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2015-04-06 19:01:13 +00:00
|
|
|
assert.domEqual( "#tabs2", function() {
|
2012-11-16 21:10:22 +00:00
|
|
|
$( "#tabs2" ).tabs().tabs( "destroy" );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
|
|
|
} );
|
2009-02-03 13:37:54 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "destroy - ajax", function( assert ) {
|
|
|
|
var ready = assert.async();
|
|
|
|
assert.expect( 1 );
|
2015-04-06 19:01:13 +00:00
|
|
|
assert.domEqual( "#tabs2", function( done ) {
|
2015-08-24 12:57:25 +00:00
|
|
|
var element = $( "#tabs2" ).tabs( {
|
2014-12-03 16:28:56 +00:00
|
|
|
load: function() {
|
2015-08-24 12:57:25 +00:00
|
|
|
setTimeout( function() {
|
2014-12-03 16:28:56 +00:00
|
|
|
element.tabs( "destroy" );
|
|
|
|
done();
|
2016-04-06 13:48:50 +00:00
|
|
|
ready();
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2014-12-03 16:28:56 +00:00
|
|
|
}
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2014-12-03 16:28:56 +00:00
|
|
|
element.tabs( "option", "active", 2 );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
|
|
|
} );
|
2014-12-03 16:28:56 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "enable", function( assert ) {
|
|
|
|
assert.expect( 8 );
|
2011-04-28 16:04:08 +00:00
|
|
|
|
2015-08-24 12:57:25 +00:00
|
|
|
var element = $( "#tabs1" ).tabs( { disabled: true } );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, true );
|
2011-04-28 16:04:08 +00:00
|
|
|
element.tabs( "enable" );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, false );
|
2011-04-28 16:04:08 +00:00
|
|
|
element.tabs( "destroy" );
|
|
|
|
|
2015-08-24 12:57:25 +00:00
|
|
|
element.tabs( { disabled: [ 0, 1 ] } );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, [ 0, 1 ] );
|
2011-04-28 16:04:08 +00:00
|
|
|
element.tabs( "enable" );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, false );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2011-04-18 01:09:47 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "enable( index )", function( assert ) {
|
|
|
|
assert.expect( 10 );
|
2011-04-28 16:04:08 +00:00
|
|
|
|
2015-08-24 12:57:25 +00:00
|
|
|
var element = $( "#tabs1" ).tabs( { disabled: true } );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, true );
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-04-28 16:04:08 +00:00
|
|
|
// fully disabled -> partially disabled
|
|
|
|
element.tabs( "enable", 1 );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, [ 0, 2 ] );
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-04-28 16:04:08 +00:00
|
|
|
// partially disabled -> partially disabled
|
|
|
|
element.tabs( "enable", 2 );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, [ 0 ] );
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-04-28 16:04:08 +00:00
|
|
|
// already enabled tab, no change
|
|
|
|
element.tabs( "enable", 2 );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, [ 0 ] );
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-04-28 16:04:08 +00:00
|
|
|
// partially disabled -> fully enabled
|
|
|
|
element.tabs( "enable", 0 );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, false );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2011-04-28 16:04:08 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "disable", function( assert ) {
|
|
|
|
assert.expect( 8 );
|
2011-04-28 16:04:08 +00:00
|
|
|
|
2015-08-24 12:57:25 +00:00
|
|
|
var element = $( "#tabs1" ).tabs( { disabled: false } );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, false );
|
2011-04-28 16:04:08 +00:00
|
|
|
element.tabs( "disable" );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, true );
|
2011-04-28 16:04:08 +00:00
|
|
|
element.tabs( "destroy" );
|
|
|
|
|
2015-08-24 12:57:25 +00:00
|
|
|
element.tabs( { disabled: [ 0, 1 ] } );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, [ 0, 1 ] );
|
2011-04-28 16:04:08 +00:00
|
|
|
element.tabs( "disable" );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, true );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2009-02-03 13:37:54 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "disable( index )", function( assert ) {
|
|
|
|
assert.expect( 10 );
|
2011-04-28 16:04:08 +00:00
|
|
|
|
2015-08-24 12:57:25 +00:00
|
|
|
var element = $( "#tabs1" ).tabs( { disabled: false } );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, false );
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-04-28 16:04:08 +00:00
|
|
|
// fully enabled -> partially disabled
|
|
|
|
element.tabs( "disable", 1 );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, [ 1 ] );
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-04-28 16:04:08 +00:00
|
|
|
// partially disabled -> partially disabled
|
|
|
|
element.tabs( "disable", 2 );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, [ 1, 2 ] );
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-04-28 16:04:08 +00:00
|
|
|
// already disabled tab, no change
|
|
|
|
element.tabs( "disable", 2 );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, [ 1, 2 ] );
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-04-28 16:04:08 +00:00
|
|
|
// partially disabled -> fully disabled
|
|
|
|
element.tabs( "disable", 0 );
|
2016-04-06 13:48:50 +00:00
|
|
|
disabled( assert, element, true );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2009-02-03 13:37:54 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "refresh", function( assert ) {
|
|
|
|
assert.expect( 27 );
|
2011-04-28 18:38:57 +00:00
|
|
|
|
|
|
|
var element = $( "#tabs1" ).tabs();
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 1, 0, 0 );
|
|
|
|
disabled( assert, element, false );
|
2011-04-28 18:38:57 +00:00
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Disable tab via markup
|
2011-04-28 18:38:57 +00:00
|
|
|
element.find( ".ui-tabs-nav li" ).eq( 1 ).addClass( "ui-state-disabled" );
|
|
|
|
element.tabs( "refresh" );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 1, 0, 0 );
|
|
|
|
disabled( assert, element, [ 1 ] );
|
2011-04-28 18:38:57 +00:00
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Add remote tab
|
2011-04-28 18:38:57 +00:00
|
|
|
element.find( ".ui-tabs-nav" ).append( "<li id='newTab'><a href='data/test.html'>new</a></li>" );
|
|
|
|
element.tabs( "refresh" );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 1, 0, 0, 0 );
|
|
|
|
disabled( assert, element, [ 1 ] );
|
|
|
|
assert.equal( element.find( "#" + $( "#newTab" ).attr( "aria-controls" ) ).length, 1,
|
2011-04-28 18:38:57 +00:00
|
|
|
"panel added for remote tab" );
|
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Remove all tabs
|
2011-04-28 18:38:57 +00:00
|
|
|
element.find( ".ui-tabs-nav li, .ui-tabs-panel" ).remove();
|
|
|
|
element.tabs( "refresh" );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element );
|
|
|
|
assert.equal( element.tabs( "option", "active" ), false, "no active tab" );
|
2011-04-28 18:38:57 +00:00
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Add tabs
|
2011-04-28 18:38:57 +00:00
|
|
|
element.find( ".ui-tabs-nav" )
|
|
|
|
.append( "<li class='ui-state-disabled'><a href='#newTab2'>new 2</a></li>" )
|
|
|
|
.append( "<li><a href='#newTab3'>new 3</a></li>" )
|
|
|
|
.append( "<li><a href='#newTab4'>new 4</a></li>" )
|
|
|
|
.append( "<li><a href='#newTab5'>new 5</a></li>" );
|
|
|
|
element
|
|
|
|
.append( "<div id='newTab2'>new 2</div>" )
|
|
|
|
.append( "<div id='newTab3'>new 3</div>" )
|
|
|
|
.append( "<div id='newTab4'>new 4</div>" )
|
|
|
|
.append( "<div id='newTab5'>new 5</div>" );
|
|
|
|
element.tabs( "refresh" );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 0, 0, 0, 0 );
|
|
|
|
disabled( assert, element, [ 0 ] );
|
2011-04-28 18:38:57 +00:00
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Activate third tab
|
2011-04-28 18:38:57 +00:00
|
|
|
element.tabs( "option", "active", 2 );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 0, 0, 1, 0 );
|
|
|
|
disabled( assert, element, [ 0 ] );
|
2011-04-28 18:38:57 +00:00
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Remove fourth tab, third tab should stay active
|
2011-04-28 18:38:57 +00:00
|
|
|
element.find( ".ui-tabs-nav li" ).eq( 3 ).remove();
|
|
|
|
element.find( ".ui-tabs-panel" ).eq( 3 ).remove();
|
|
|
|
element.tabs( "refresh" );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 0, 0, 1 );
|
|
|
|
disabled( assert, element, [ 0 ] );
|
2011-04-28 18:38:57 +00:00
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Remove third (active) tab, second tab should become active
|
2011-04-28 18:38:57 +00:00
|
|
|
element.find( ".ui-tabs-nav li" ).eq( 2 ).remove();
|
|
|
|
element.find( ".ui-tabs-panel" ).eq( 2 ).remove();
|
|
|
|
element.tabs( "refresh" );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 0, 1 );
|
|
|
|
disabled( assert, element, [ 0 ] );
|
2012-02-28 14:56:32 +00:00
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Remove first tab, previously active tab (now first) should stay active
|
2011-04-28 18:38:57 +00:00
|
|
|
element.find( ".ui-tabs-nav li" ).eq( 0 ).remove();
|
|
|
|
element.find( ".ui-tabs-panel" ).eq( 0 ).remove();
|
|
|
|
element.tabs( "refresh" );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 1 );
|
|
|
|
disabled( assert, element, false );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2011-03-27 00:37:26 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "refresh - looping", function( assert ) {
|
|
|
|
assert.expect( 6 );
|
2012-06-12 14:07:16 +00:00
|
|
|
|
2015-08-24 12:57:25 +00:00
|
|
|
var element = $( "#tabs1" ).tabs( {
|
2012-06-12 14:07:16 +00:00
|
|
|
disabled: [ 0 ],
|
|
|
|
active: 1
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 0, 1, 0 );
|
|
|
|
disabled( assert, element, [ 0 ] );
|
2012-06-12 14:07:16 +00:00
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Remove active, jump to previous
|
2012-06-12 14:07:16 +00:00
|
|
|
// previous is disabled, just back one more
|
|
|
|
// reached first tab, move to end
|
|
|
|
// activate last tab
|
|
|
|
element.find( ".ui-tabs-nav li" ).eq( 2 ).remove();
|
|
|
|
element.tabs( "refresh" );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 0, 1 );
|
|
|
|
disabled( assert, element, [ 0 ] );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2012-06-12 14:07:16 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "load", function( assert ) {
|
|
|
|
var ready = assert.async();
|
|
|
|
assert.expect( 30 );
|
2011-05-16 18:41:27 +00:00
|
|
|
|
|
|
|
var element = $( "#tabs2" ).tabs();
|
|
|
|
|
2015-08-21 04:04:44 +00:00
|
|
|
// Load content of inactive tab
|
2011-05-16 18:41:27 +00:00
|
|
|
// useful for preloading content with custom caching
|
|
|
|
element.one( "tabsbeforeload", function( event, ui ) {
|
2012-05-18 20:11:14 +00:00
|
|
|
var tab = element.find( ".ui-tabs-nav li" ).eq( 3 ),
|
2011-05-16 18:41:27 +00:00
|
|
|
panelId = tab.attr( "aria-controls" ),
|
|
|
|
panel = $( "#" + panelId );
|
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
assert.ok( !( "originalEvent" in event ), "originalEvent" );
|
|
|
|
assert.equal( ui.tab.length, 1, "tab length" );
|
|
|
|
assert.strictEqual( ui.tab[ 0 ], tab[ 0 ], "tab" );
|
|
|
|
assert.equal( ui.panel.length, 1, "panel length" );
|
|
|
|
assert.strictEqual( ui.panel[ 0 ], panel[ 0 ], "panel" );
|
|
|
|
state( assert, element, 1, 0, 0, 0, 0 );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2011-05-16 18:41:27 +00:00
|
|
|
element.one( "tabsload", function( event, ui ) {
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-05-17 19:46:41 +00:00
|
|
|
// TODO: remove wrapping in 2.0
|
|
|
|
var uiTab = $( ui.tab ),
|
2012-04-19 02:36:15 +00:00
|
|
|
uiPanel = $( ui.panel ),
|
2012-05-18 20:11:14 +00:00
|
|
|
tab = element.find( ".ui-tabs-nav li" ).eq( 3 ),
|
2011-05-16 18:41:27 +00:00
|
|
|
panelId = tab.attr( "aria-controls" ),
|
|
|
|
panel = $( "#" + panelId );
|
2012-02-28 14:56:32 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
assert.ok( !( "originalEvent" in event ), "originalEvent" );
|
|
|
|
assert.equal( uiTab.length, 1, "tab length" );
|
|
|
|
assert.strictEqual( uiTab[ 0 ], tab[ 0 ], "tab" );
|
|
|
|
assert.equal( uiPanel.length, 1, "panel length" );
|
|
|
|
assert.strictEqual( uiPanel[ 0 ], panel[ 0 ], "panel" );
|
|
|
|
assert.equal( uiPanel.find( "p" ).length, 1, "panel html" );
|
|
|
|
state( assert, element, 1, 0, 0, 0, 0 );
|
2015-02-17 15:11:58 +00:00
|
|
|
setTimeout( tabsload1 );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2011-05-16 18:41:27 +00:00
|
|
|
element.tabs( "load", 3 );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 1, 0, 0, 0, 0 );
|
2011-05-16 18:41:27 +00:00
|
|
|
|
|
|
|
function tabsload1() {
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-05-16 18:41:27 +00:00
|
|
|
// no need to test details of event (tested in events tests)
|
|
|
|
element.one( "tabsbeforeload", function() {
|
2016-04-06 13:48:50 +00:00
|
|
|
assert.ok( true, "tabsbeforeload invoked" );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2011-05-16 18:41:27 +00:00
|
|
|
element.one( "tabsload", function() {
|
2016-04-06 13:48:50 +00:00
|
|
|
assert.ok( true, "tabsload invoked" );
|
2015-02-17 15:11:58 +00:00
|
|
|
setTimeout( tabsload2 );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2011-05-16 18:41:27 +00:00
|
|
|
element.tabs( "option", "active", 3 );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 0, 0, 0, 1, 0 );
|
2011-05-16 18:41:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function tabsload2() {
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-05-16 18:41:27 +00:00
|
|
|
// reload content of active tab
|
|
|
|
element.one( "tabsbeforeload", function( event, ui ) {
|
2012-05-18 20:11:14 +00:00
|
|
|
var tab = element.find( ".ui-tabs-nav li" ).eq( 3 ),
|
2011-05-16 18:41:27 +00:00
|
|
|
panelId = tab.attr( "aria-controls" ),
|
|
|
|
panel = $( "#" + panelId );
|
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
assert.ok( !( "originalEvent" in event ), "originalEvent" );
|
|
|
|
assert.equal( ui.tab.length, 1, "tab length" );
|
|
|
|
assert.strictEqual( ui.tab[ 0 ], tab[ 0 ], "tab" );
|
|
|
|
assert.equal( ui.panel.length, 1, "panel length" );
|
|
|
|
assert.strictEqual( ui.panel[ 0 ], panel[ 0 ], "panel" );
|
|
|
|
state( assert, element, 0, 0, 0, 1, 0 );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2011-05-16 18:41:27 +00:00
|
|
|
element.one( "tabsload", function( event, ui ) {
|
2015-08-24 12:57:25 +00:00
|
|
|
|
2011-05-17 19:46:41 +00:00
|
|
|
// TODO: remove wrapping in 2.0
|
|
|
|
var uiTab = $( ui.tab ),
|
2012-04-19 02:36:15 +00:00
|
|
|
uiPanel = $( ui.panel ),
|
2012-05-18 20:11:14 +00:00
|
|
|
tab = element.find( ".ui-tabs-nav li" ).eq( 3 ),
|
2011-05-16 18:41:27 +00:00
|
|
|
panelId = tab.attr( "aria-controls" ),
|
|
|
|
panel = $( "#" + panelId );
|
2012-02-28 14:56:32 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
assert.ok( !( "originalEvent" in event ), "originalEvent" );
|
|
|
|
assert.equal( uiTab.length, 1, "tab length" );
|
|
|
|
assert.strictEqual( uiTab[ 0 ], tab[ 0 ], "tab" );
|
|
|
|
assert.equal( uiPanel.length, 1, "panel length" );
|
|
|
|
assert.strictEqual( uiPanel[ 0 ], panel[ 0 ], "panel" );
|
|
|
|
state( assert, element, 0, 0, 0, 1, 0 );
|
|
|
|
ready();
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2011-05-16 18:41:27 +00:00
|
|
|
element.tabs( "load", 3 );
|
2016-04-06 13:48:50 +00:00
|
|
|
state( assert, element, 0, 0, 0, 1, 0 );
|
2011-05-16 18:41:27 +00:00
|
|
|
}
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2009-02-03 13:37:54 +00:00
|
|
|
|
2016-04-06 13:48:50 +00:00
|
|
|
QUnit.test( "widget", function( assert ) {
|
|
|
|
assert.expect( 2 );
|
2012-08-27 00:20:43 +00:00
|
|
|
var element = $( "#tabs1" ).tabs(),
|
|
|
|
widgetElement = element.tabs( "widget" );
|
2016-04-06 13:48:50 +00:00
|
|
|
assert.equal( widgetElement.length, 1, "one element" );
|
|
|
|
assert.strictEqual( widgetElement[ 0 ], element[ 0 ], "same element" );
|
2015-08-24 12:57:25 +00:00
|
|
|
} );
|
2012-08-27 00:20:43 +00:00
|
|
|
|
2015-04-06 19:01:13 +00:00
|
|
|
} );
|