@@ -133,20 +133,28 @@ test( "{ collapsible: true }", function() {
133
133
tabs_state ( element , 0 , 0 , 0 ) ;
134
134
} ) ;
135
135
136
- test ( ' disabled' , function ( ) {
137
- expect ( 4 ) ;
136
+ test ( " disabled" , function ( ) {
137
+ expect ( 10 ) ;
138
138
139
- el = $ ( '#tabs1' ) . tabs ( ) ;
140
- same ( el . tabs ( 'option' , 'disabled' ) , false , "should not disable any tab by default" ) ;
139
+ // fully enabled by default
140
+ var element = $ ( "#tabs1" ) . tabs ( ) ;
141
+ tabs_disabled ( element , false ) ;
142
+
143
+ // disable single tab
144
+ element . tabs ( "option" , "disabled" , [ 1 ] ) ;
145
+ tabs_disabled ( element , [ 1 ] ) ;
141
146
142
- el . tabs ( 'option' , 'disabled' , [ 1 ] ) ;
143
- same ( el . tabs ( 'option' , 'disabled' ) , [ 1 ] , "should set property" ) ; // everything else is being tested in methods module...
147
+ // disabled active tab
148
+ element . tabs ( "option" , "disabled" , [ 0 , 1 ] ) ;
149
+ tabs_disabled ( element , [ 0 , 1 ] ) ;
144
150
145
- el . tabs ( 'option' , 'disabled' , [ 0 , 1 ] ) ;
146
- same ( el . tabs ( 'option' , 'disabled' ) , [ 0 , 1 ] , "should disable given tabs, even selected one" ) ; // ...
151
+ // disable all tabs
152
+ element . tabs ( "option" , "disabled" , [ 0 , 1 , 2 ] ) ;
153
+ tabs_disabled ( element , true ) ;
147
154
148
- el . tabs ( 'option' , 'disabled' , [ ] ) ;
149
- same ( el . tabs ( 'option' , 'disabled' ) , false , "should not disable any tab" ) ; // ...
155
+ // enable all tabs
156
+ element . tabs ( "option" , "disabled" , [ ] ) ;
157
+ tabs_disabled ( element , false ) ;
150
158
} ) ;
151
159
152
160
test ( "{ event: null }" , function ( ) {
@@ -200,8 +208,6 @@ test( "{ event: custom }", function() {
200
208
tabs_state ( element , 0 , 1 , 0 ) ;
201
209
} ) ;
202
210
203
- test ( 'fx' , function ( ) {
204
- ok ( false , "missing test - untested code is broken code." ) ;
205
- } ) ;
211
+ // TODO: add animation tests
206
212
207
213
} ) ( jQuery ) ;
0 commit comments