@@ -983,7 +983,7 @@ test( "_off() - all events", function() {
983983 element . trigger ( "bar" ) ;
984984} ) ;
985985
986- test ( "._hoverable()" , function ( ) {
986+ test ( "._hoverable()" , function ( assert ) {
987987 expect ( 10 ) ;
988988 $ . widget ( "ui.testWidget" , {
989989 _create : function ( ) {
@@ -992,30 +992,30 @@ test( "._hoverable()", function() {
992992 } ) ;
993993
994994 var div = $ ( "#widget" ) . testWidget ( ) . children ( ) ;
995- ok ( ! div . hasClass ( "ui-state-hover" ) , "not hovered on init" ) ;
995+ assert . lacksClasses ( div , "ui-state-hover" , "not hovered on init" ) ;
996996 div . trigger ( "mouseenter" ) ;
997- ok ( div . hasClass ( "ui-state-hover" ) , "hovered after mouseenter" ) ;
997+ assert . hasClasses ( div , "ui-state-hover" , "hovered after mouseenter" ) ;
998998 div . trigger ( "mouseleave" ) ;
999- ok ( ! div . hasClass ( "ui-state-hover" ) , "not hovered after mouseleave" ) ;
999+ assert . lacksClasses ( div , "ui-state-hover" , "not hovered after mouseleave" ) ;
10001000
10011001 div . trigger ( "mouseenter" ) ;
1002- ok ( div . hasClass ( "ui-state-hover" ) , "hovered after mouseenter" ) ;
1002+ assert . hasClasses ( div , "ui-state-hover" , "hovered after mouseenter" ) ;
10031003 $ ( "#widget" ) . testWidget ( "disable" ) ;
1004- ok ( ! div . hasClass ( "ui-state-hover" ) , "not hovered while disabled" ) ;
1004+ assert . lacksClasses ( div , "ui-state-hover" , "not hovered while disabled" ) ;
10051005 div . trigger ( "mouseenter" ) ;
1006- ok ( ! div . hasClass ( "ui-state-hover" ) , "can't hover while disabled" ) ;
1006+ assert . lacksClasses ( div , "ui-state-hover" , "can't hover while disabled" ) ;
10071007 $ ( "#widget" ) . testWidget ( "enable" ) ;
1008- ok ( ! div . hasClass ( "ui-state-hover" ) , "enabling doesn't reset hover" ) ;
1008+ assert . lacksClasses ( div , "ui-state-hover" , "enabling doesn't reset hover" ) ;
10091009
10101010 div . trigger ( "mouseenter" ) ;
1011- ok ( div . hasClass ( "ui-state-hover" ) , "hovered after mouseenter" ) ;
1011+ assert . hasClasses ( div , "ui-state-hover" , "hovered after mouseenter" ) ;
10121012 $ ( "#widget" ) . testWidget ( "destroy" ) ;
1013- ok ( ! div . hasClass ( "ui-state-hover" ) , "not hovered after destroy" ) ;
1013+ assert . lacksClasses ( div , "ui-state-hover" , "not hovered after destroy" ) ;
10141014 div . trigger ( "mouseenter" ) ;
1015- ok ( ! div . hasClass ( "ui-state-hover" ) , "event handler removed on destroy" ) ;
1015+ assert . lacksClasses ( div , "ui-state-hover" , "event handler removed on destroy" ) ;
10161016} ) ;
10171017
1018- test ( "._focusable()" , function ( ) {
1018+ test ( "._focusable()" , function ( assert ) {
10191019 expect ( 10 ) ;
10201020 $ . widget ( "ui.testWidget" , {
10211021 _create : function ( ) {
@@ -1024,27 +1024,27 @@ test( "._focusable()", function() {
10241024 } ) ;
10251025
10261026 var div = $ ( "#widget" ) . testWidget ( ) . children ( ) ;
1027- ok ( ! div . hasClass ( "ui-state-focus" ) , "not focused on init" ) ;
1027+ assert . lacksClasses ( div , "ui-state-focus" , "not focused on init" ) ;
10281028 div . trigger ( "focusin" ) ;
1029- ok ( div . hasClass ( "ui-state-focus" ) , "focused after explicit focus" ) ;
1029+ assert . hasClasses ( div , "ui-state-focus" , "focused after explicit focus" ) ;
10301030 div . trigger ( "focusout" ) ;
1031- ok ( ! div . hasClass ( "ui-state-focus" ) , "not focused after blur" ) ;
1031+ assert . lacksClasses ( div , "ui-state-focus" , "not focused after blur" ) ;
10321032
10331033 div . trigger ( "focusin" ) ;
1034- ok ( div . hasClass ( "ui-state-focus" ) , "focused after explicit focus" ) ;
1034+ assert . hasClasses ( div , "ui-state-focus" , "focused after explicit focus" ) ;
10351035 $ ( "#widget" ) . testWidget ( "disable" ) ;
1036- ok ( ! div . hasClass ( "ui-state-focus" ) , "not focused while disabled" ) ;
1036+ assert . lacksClasses ( div , "ui-state-focus" , "not focused while disabled" ) ;
10371037 div . trigger ( "focusin" ) ;
1038- ok ( ! div . hasClass ( "ui-state-focus" ) , "can't focus while disabled" ) ;
1038+ assert . lacksClasses ( div , "ui-state-focus" , "can't focus while disabled" ) ;
10391039 $ ( "#widget" ) . testWidget ( "enable" ) ;
1040- ok ( ! div . hasClass ( "ui-state-focus" ) , "enabling doesn't reset focus" ) ;
1040+ assert . lacksClasses ( div , "ui-state-focus" , "enabling doesn't reset focus" ) ;
10411041
10421042 div . trigger ( "focusin" ) ;
1043- ok ( div . hasClass ( "ui-state-focus" ) , "focused after explicit focus" ) ;
1043+ assert . hasClasses ( div , "ui-state-focus" , "focused after explicit focus" ) ;
10441044 $ ( "#widget" ) . testWidget ( "destroy" ) ;
1045- ok ( ! div . hasClass ( "ui-state-focus" ) , "not focused after destroy" ) ;
1045+ assert . lacksClasses ( div , "ui-state-focus" , "not focused after destroy" ) ;
10461046 div . trigger ( "focusin" ) ;
1047- ok ( ! div . hasClass ( "ui-state-focus" ) , "event handler removed on destroy" ) ;
1047+ assert . lacksClasses ( div , "ui-state-focus" , "event handler removed on destroy" ) ;
10481048} ) ;
10491049
10501050test ( "._trigger() - no event, no ui" , function ( ) {
0 commit comments