Skip to content

Commit 14e0c3f

Browse files
committed
test(material-experimental/mdc-radio): add missing test coverage
Adds tests that were missing from the `mdc-radio` module.
1 parent 39063f8 commit 14e0c3f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/material-experimental/mdc-radio/radio.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,16 @@ describe('MDC-based MatRadio', () => {
784784
.toBe(4, 'Expected the tabindex to be set to "4".');
785785
});
786786

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+
787797
it('should set the tabindex to -1 on the host element', () => {
788798
const predefinedFixture = TestBed.createComponent(RadioButtonWithPredefinedTabindex);
789799
predefinedFixture.detectChanges();

0 commit comments

Comments
 (0)