aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/autocomplete/autocomplete_common.js2
-rw-r--r--tests/unit/autocomplete/autocomplete_options.js8
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/autocomplete/autocomplete_common.js b/tests/unit/autocomplete/autocomplete_common.js
index e1d24ef8d..63b24d384 100644
--- a/tests/unit/autocomplete/autocomplete_common.js
+++ b/tests/unit/autocomplete/autocomplete_common.js
@@ -1,6 +1,6 @@
TestHelpers.commonWidgetTests( "autocomplete", {
defaults: {
- appendTo: "body",
+ appendTo: null,
autoFocus: false,
delay: 300,
disabled: false,
diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js
index 913f5bc28..9f0bd2d43 100644
--- a/tests/unit/autocomplete/autocomplete_options.js
+++ b/tests/unit/autocomplete/autocomplete_options.js
@@ -18,11 +18,11 @@ test( "appendTo", function() {
equal( $( "#ac-wrap2 .ui-autocomplete" ).length, 0, "only appends to one element" );
element.autocomplete( "destroy" );
- element.autocomplete({
- appendTo: null
- });
- equal( element.autocomplete( "widget" ).parent()[0], document.body, "null" );
+ $( "#ac-wrap2" ).addClass( "ui-front" );
+ element.autocomplete();
+ equal( element.autocomplete( "widget" ).parent()[0], $( "#ac-wrap2" )[0], "null, inside .ui-front" );
element.autocomplete( "destroy" );
+ $( "#ac-wrap2" ).removeClass( "ui-front" );
element.autocomplete().autocomplete( "option", "appendTo", "#ac-wrap1" );
equal( element.autocomplete( "widget" ).parent()[0], $( "#ac-wrap1" )[0], "modified after init" );