aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-11-09 13:28:13 -0500
committerScott González <scott.gonzalez@gmail.com>2012-11-09 13:28:13 -0500
commitf5870712c1f73c474a6980bb16d12768f4150984 (patch)
tree908c260e0e03ac398cbc1398606e73221058ee2b /tests
parent498aadf644ddca86de838dc2001267ded972df2c (diff)
downloadjquery-ui-f5870712c1f73c474a6980bb16d12768f4150984.tar.gz
jquery-ui-f5870712c1f73c474a6980bb16d12768f4150984.zip
Updated all widgets to use proper data keys when getting plugin instances.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/autocomplete/autocomplete_core.js4
-rw-r--r--tests/unit/dialog/dialog_events.js4
-rw-r--r--tests/unit/draggable/draggable_events.js2
-rw-r--r--tests/unit/tabs/tabs_core.js6
-rw-r--r--tests/unit/tabs/tabs_options.js4
5 files changed, 10 insertions, 10 deletions
diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js
index f2062cacd..845a3b19d 100644
--- a/tests/unit/autocomplete/autocomplete_core.js
+++ b/tests/unit/autocomplete/autocomplete_core.js
@@ -99,7 +99,7 @@ test( "allow form submit on enter when menu is not active", function() {
delay: 0,
minLength: 0
});
- element.data( "autocomplete" )._move = function() {
+ element.data( "ui-autocomplete" )._move = function() {
didMove = true;
};
element.simulate( "keydown", { keyCode: ( isKeyUp ? $.ui.keyCode.UP : $.ui.keyCode.DOWN ) } );
@@ -114,7 +114,7 @@ test( "allow form submit on enter when menu is not active", function() {
delay: 0,
minLength: 0
});
- element.data( "autocomplete" )._move = function() {
+ element.data( "ui-autocomplete" )._move = function() {
ok( true, "repsond to arrow" );
};
element.autocomplete( "search" );
diff --git a/tests/unit/dialog/dialog_events.js b/tests/unit/dialog/dialog_events.js
index c5090d8f6..ee7a8bcb3 100644
--- a/tests/unit/dialog/dialog_events.js
+++ b/tests/unit/dialog/dialog_events.js
@@ -11,7 +11,7 @@ test("open", function() {
var el = $("<div></div>");
el.dialog({
open: function(ev, ui) {
- ok(el.data("dialog")._isOpen, "interal _isOpen flag is set");
+ ok(el.data("ui-dialog")._isOpen, "interal _isOpen flag is set");
ok(true, 'autoOpen: true fires open callback');
equal(this, el[0], "context of callback");
equal(ev.type, 'dialogopen', 'event type in callback');
@@ -30,7 +30,7 @@ test("open", function() {
deepEqual(ui, {}, 'ui hash in callback');
}
}).bind('dialogopen', function(ev, ui) {
- ok(el.data("dialog")._isOpen, "interal _isOpen flag is set");
+ ok(el.data("ui-dialog")._isOpen, "interal _isOpen flag is set");
ok(true, 'dialog("open") fires open event');
equal(this, el[0], 'context of event');
deepEqual(ui, {}, 'ui hash in event');
diff --git a/tests/unit/draggable/draggable_events.js b/tests/unit/draggable/draggable_events.js
index 6b1136cb0..5eab97713 100644
--- a/tests/unit/draggable/draggable_events.js
+++ b/tests/unit/draggable/draggable_events.js
@@ -79,7 +79,7 @@ test("stopping the stop callback", function() {
TestHelpers.draggable.drag(el, 10, 10);
- ok($("#draggable2").data('draggable').helper, "the clone should not be deleted if the stop callback is stopped");
+ ok($("#draggable2").data('ui-draggable').helper, "the clone should not be deleted if the stop callback is stopped");
});
diff --git a/tests/unit/tabs/tabs_core.js b/tests/unit/tabs/tabs_core.js
index 6307c4488..20364a37d 100644
--- a/tests/unit/tabs/tabs_core.js
+++ b/tests/unit/tabs/tabs_core.js
@@ -33,7 +33,7 @@ test( "nested list", function() {
expect( 1 );
var element = $( "#tabs6" ).tabs();
- equal( element.data( "tabs" ).anchors.length, 2, "should contain 2 tab" );
+ equal( element.data( "ui-tabs" ).anchors.length, 2, "should contain 2 tab" );
});
test( "disconnected from DOM", function() {
@@ -155,7 +155,7 @@ asyncTest( "keyboard support - LEFT, RIGHT, UP, DOWN, HOME, END, SPACE, ENTER",
panels = element.find( ".ui-tabs-panel" ),
keyCode = $.ui.keyCode;
- element.data( "tabs" ).delay = 50;
+ element.data( "ui-tabs" ).delay = 50;
equal( tabs.filter( ".ui-state-focus" ).length, 0, "no tabs focused on init" );
tabs.eq( 0 ).simulate( "focus" );
@@ -306,7 +306,7 @@ asyncTest( "keyboard support - CTRL navigation", function() {
panels = element.find( ".ui-tabs-panel" ),
keyCode = $.ui.keyCode;
- element.data( "tabs" ).delay = 50;
+ element.data( "ui-tabs" ).delay = 50;
equal( tabs.filter( ".ui-state-focus" ).length, 0, "no tabs focused on init" );
tabs.eq( 0 ).simulate( "focus" );
diff --git a/tests/unit/tabs/tabs_options.js b/tests/unit/tabs/tabs_options.js
index c320c9d46..f6e89e84f 100644
--- a/tests/unit/tabs/tabs_options.js
+++ b/tests/unit/tabs/tabs_options.js
@@ -290,7 +290,7 @@ test( "hide and show: false", function() {
show: false,
hide: false
}),
- widget = element.data( "tabs" ),
+ widget = element.data( "ui-tabs" ),
panels = element.find( ".ui-tabs-panel" );
widget._show = function() {
ok( false, "_show() called" );
@@ -311,7 +311,7 @@ asyncTest( "hide and show - animation", function() {
show: "drop",
hide: 2000
}),
- widget = element.data( "tabs" ),
+ widget = element.data( "ui-tabs" ),
panels = element.find( ".ui-tabs-panel" );
widget._show = function( element, options, callback ) {
strictEqual( element[ 0 ], panels[ 1 ], "correct element in _show()" );