File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/material-experimental/mdc-radio Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -784,6 +784,16 @@ describe('MDC-based MatRadio', () => {
784
784
. toBe ( 4 , 'Expected the tabindex to be set to "4".' ) ;
785
785
} ) ;
786
786
787
+ it ( 'should remove the tabindex from the host element' , ( ) => {
788
+ const predefinedFixture = TestBed . createComponent ( RadioButtonWithPredefinedTabindex ) ;
789
+ predefinedFixture . detectChanges ( ) ;
790
+
791
+ const radioButtonEl =
792
+ predefinedFixture . debugElement . query ( By . css ( '.mat-mdc-radio-button' ) ) ! . nativeElement ;
793
+
794
+ expect ( radioButtonEl . getAttribute ( 'tabindex' ) ) . toBe ( '-1' ) ;
795
+ } ) ;
796
+
787
797
it ( 'should set the tabindex to -1 on the host element' , ( ) => {
788
798
const predefinedFixture = TestBed . createComponent ( RadioButtonWithPredefinedTabindex ) ;
789
799
predefinedFixture . detectChanges ( ) ;
You can’t perform that action at this time.
0 commit comments