@@ -152,25 +152,22 @@ describe('MdCheckbox', () => {
152
152
testComponent . isChecked = true ;
153
153
fixture . detectChanges ( ) ;
154
154
155
+ fixture . detectChanges ( ) ;
156
+ expect ( checkboxInstance . checked ) . toBe ( true ) ;
157
+ expect ( inputElement . indeterminate ) . toBe ( true ) ;
158
+ expect ( inputElement . checked ) . toBe ( true ) ;
159
+ expect ( testComponent . isIndeterminate ) . toBe ( true ) ;
160
+
161
+ testComponent . isChecked = false ;
162
+ fixture . detectChanges ( ) ;
163
+
155
164
fixture . whenStable ( ) . then ( ( ) => {
156
165
fixture . detectChanges ( ) ;
157
- expect ( checkboxInstance . checked ) . toBe ( true ) ;
166
+ expect ( checkboxInstance . checked ) . toBe ( false ) ;
158
167
expect ( inputElement . indeterminate ) . toBe ( true ) ;
159
- expect ( inputElement . checked ) . toBe ( true ) ;
168
+ expect ( inputElement . checked ) . toBe ( false ) ;
160
169
expect ( testComponent . isIndeterminate ) . toBe ( true ) ;
161
-
162
- testComponent . isChecked = false ;
163
- fixture . detectChanges ( ) ;
164
-
165
- fixture . whenStable ( ) . then ( ( ) => {
166
- fixture . detectChanges ( ) ;
167
- expect ( checkboxInstance . checked ) . toBe ( false ) ;
168
- expect ( inputElement . indeterminate ) . toBe ( true ) ;
169
- expect ( inputElement . checked ) . toBe ( false ) ;
170
- expect ( testComponent . isIndeterminate ) . toBe ( true ) ;
171
- } ) ;
172
170
} ) ;
173
-
174
171
} ) ) ;
175
172
176
173
it ( 'should change native element checked when check programmatically' , ( ) => {
0 commit comments