@@ -35,7 +35,7 @@ test("buttons", function() {
3535 } ,
3636 el = $ ( '<div></div>' ) . dialog ( { buttons : buttons } ) ;
3737
38- btn = $ ( "button" , el . dialog ( ' widget' ) ) ;
38+ btn = el . dialog ( " widget" ) . find ( ".ui-dialog-buttonpane button" ) ;
3939 equal ( btn . length , 2 , "number of buttons" ) ;
4040
4141 i = 0 ;
@@ -61,7 +61,7 @@ test("buttons", function() {
6161 el . dialog ( "option" , "buttons" , newButtons ) ;
6262 deepEqual ( el . dialog ( "option" , "buttons" ) , newButtons , '.dialog("option", "buttons", ...) setter' ) ;
6363
64- btn = $ ( "button" , el . dialog ( ' widget' ) ) ;
64+ btn = el . dialog ( " widget" ) . find ( ".ui-dialog-buttonpane button" ) ;
6565 equal ( btn . length , 1 , "number of buttons after setter" ) ;
6666 btn . trigger ( 'click' ) ;
6767
@@ -72,7 +72,7 @@ test("buttons", function() {
7272 } ) ;
7373
7474 el . dialog ( "option" , "buttons" , null ) ;
75- btn = $ ( "button" , el . dialog ( ' widget' ) ) ;
75+ btn = el . dialog ( " widget" ) . find ( ".ui-dialog-buttonpane button" ) ;
7676 equal ( btn . length , 0 , "all buttons have been removed" ) ;
7777 equal ( el . find ( ".ui-dialog-buttonset" ) . length , 0 , "buttonset has been removed" ) ;
7878 equal ( el . parent ( ) . hasClass ( 'ui-dialog-buttons' ) , false , "dialog wrapper removes class about having buttons" ) ;
@@ -97,7 +97,7 @@ test("buttons - advanced", function() {
9797 ]
9898 } ) ;
9999
100- buttons = el . dialog ( ' widget' ) . find ( " button") ;
100+ buttons = el . dialog ( " widget" ) . find ( ".ui-dialog-buttonpane button" ) ;
101101 equal ( buttons . length , 1 , "correct number of buttons" ) ;
102102 equal ( buttons . attr ( "id" ) , "my-button-id" , "correct id" ) ;
103103 equal ( buttons . text ( ) , "a button" , "correct label" ) ;
0 commit comments