File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ test( "refresh - structure", function () {
69
69
} ) ;
70
70
71
71
asyncTest ( "refresh - change selected option" , function ( ) {
72
- expect ( 3 ) ;
72
+ expect ( 4 ) ;
73
73
74
74
var element = $ ( "#speed" ) . selectmenu ( ) ,
75
75
button = element . selectmenu ( "widget" ) ;
@@ -83,9 +83,13 @@ asyncTest( "refresh - change selected option", function () {
83
83
84
84
element [ 0 ] . selectedIndex = 0 ;
85
85
element . selectmenu ( "refresh" ) ;
86
-
87
86
equal ( element . find ( "option:selected" ) . text ( ) , button . text ( ) , "button text after changing selected option" ) ;
88
87
88
+ element . find ( "option" ) . removeAttr ( "selected" ) ;
89
+ element . prepend ( "<option selected value=\"selected_option\">Selected option</option>" ) ;
90
+ element . selectmenu ( "refresh" ) ;
91
+ equal ( element . find ( "option:selected" ) . text ( ) , button . text ( ) , "button text after adding selected option" ) ;
92
+
89
93
start ( ) ;
90
94
} , 1 ) ;
91
95
} ) ;
You can’t perform that action at this time.
0 commit comments