File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,20 @@ describe('MdCheckbox', () => {
332
332
expect ( checkboxDebugElement . nativeElement . classList . contains ( 'custom-class' ) ) . toBe ( true ) ;
333
333
334
334
} ) ;
335
+
336
+ it ( 'should activate the ripple focused class when the input is focused' , ( ) => {
337
+ expect ( checkboxNativeElement . classList ) . not . toContain ( 'md-ripple-focused' ) ;
338
+
339
+ checkboxInstance . _onInputFocus ( ) ;
340
+ fixture . detectChanges ( ) ;
341
+
342
+ expect ( checkboxNativeElement . classList ) . toContain ( 'md-ripple-focused' ) ;
343
+
344
+ checkboxInstance . _onInputBlur ( ) ;
345
+ fixture . detectChanges ( ) ;
346
+
347
+ expect ( checkboxNativeElement . classList ) . not . toContain ( 'md-ripple-focused' ) ;
348
+ } ) ;
335
349
} ) ;
336
350
337
351
describe ( 'state transition css classes' , ( ) => {
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export class MdCheckboxChange {
73
73
'[class.md-checkbox-checked]' : 'checked' ,
74
74
'[class.md-checkbox-disabled]' : 'disabled' ,
75
75
'[class.md-checkbox-align-end]' : 'align == "end"' ,
76
- '[class.md-checkbox -focused]' : '_hasFocus' ,
76
+ '[class.md-ripple -focused]' : '_hasFocus' , // TODO: should only be triggered by keyboard focus
77
77
} ,
78
78
providers : [ MD_CHECKBOX_CONTROL_VALUE_ACCESSOR ] ,
79
79
encapsulation : ViewEncapsulation . None ,
You can’t perform that action at this time.
0 commit comments