File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -92,15 +92,24 @@ test("buttonset (rtl)", function() {
92
92
// remove this when simulate properly simulates this
93
93
// see http://yuilibrary.com/projects/yui2/ticket/2528826 fore more info
94
94
if ( ! $ . ui . ie || ( document . documentMode && document . documentMode > 8 ) ) {
95
- test ( "ensure checked and aria after single click on checkbox label button, see #5518" , function ( ) {
95
+ asyncTest ( "ensure checked and aria after single click on checkbox label button, see #5518" , function ( ) {
96
96
expect ( 3 ) ;
97
97
98
98
$ ( "#check2" ) . button ( ) . change ( function ( ) {
99
99
var lbl = $ ( this ) . button ( "widget" ) ;
100
100
ok ( this . checked , "checked ok" ) ;
101
101
ok ( lbl . attr ( "aria-pressed" ) === "true" , "aria ok" ) ;
102
102
ok ( lbl . hasClass ( "ui-state-active" ) , "ui-state-active ok" ) ;
103
- } ) . button ( "widget" ) . simulate ( "mousedown" ) . simulate ( "click" ) . simulate ( "mouseup" ) ;
103
+ } ) ;
104
+
105
+ // support: Opera
106
+ // Opera doesn't trigger a change event when this is done synchronously.
107
+ // This seems to be a side effect of another test, but until that can be
108
+ // tracked down, this delay will have to do.
109
+ setTimeout ( function ( ) {
110
+ $ ( "#check2" ) . button ( "widget" ) . simulate ( "click" ) ;
111
+ start ( ) ;
112
+ } , 1 ) ;
104
113
} ) ;
105
114
}
106
115
You can’t perform that action at this time.
0 commit comments