aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/autocomplete/autocomplete_options.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/autocomplete/autocomplete_options.js')
-rw-r--r--tests/unit/autocomplete/autocomplete_options.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js
index 9f0bd2d43..c98f2c28e 100644
--- a/tests/unit/autocomplete/autocomplete_options.js
+++ b/tests/unit/autocomplete/autocomplete_options.js
@@ -88,17 +88,20 @@ asyncTest( "delay", function() {
});
asyncTest( "disabled", function() {
- expect( 2 );
+ expect( 5 );
var element = $( "#autocomplete" ).autocomplete({
source: data,
- delay: 0,
- disabled: true
+ delay: 0
}),
- menu = element.autocomplete( "widget" );
+ menu = element.autocomplete( "disable" ).autocomplete( "widget" );
element.val( "ja" ).keydown();
ok( menu.is( ":hidden" ) );
+ ok( !element.is( ".ui-state-disabled" ), "element doesn't get ui-state-disabled" );
+ ok( !element.attr( "aria-disabled" ), "element doesn't get aria-disabled" );
+ ok( menu.is( ".ui-autocomplete-disabled" ), "element gets ui-autocomplete-disabled" );
+
setTimeout(function() {
ok( menu.is( ":hidden" ) );
start();