@@ -152,25 +152,22 @@ describe('MdCheckbox', () => {
152152 testComponent . isChecked = true ;
153153 fixture . detectChanges ( ) ;
154154
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+
155164 fixture . whenStable ( ) . then ( ( ) => {
156165 fixture . detectChanges ( ) ;
157- expect ( checkboxInstance . checked ) . toBe ( true ) ;
166+ expect ( checkboxInstance . checked ) . toBe ( false ) ;
158167 expect ( inputElement . indeterminate ) . toBe ( true ) ;
159- expect ( inputElement . checked ) . toBe ( true ) ;
168+ expect ( inputElement . checked ) . toBe ( false ) ;
160169 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- } ) ;
172170 } ) ;
173-
174171 } ) ) ;
175172
176173 it ( 'should change native element checked when check programmatically' , ( ) => {
0 commit comments