Asserts that arrow key direction works correctly in RTL mode.
(
fixture: ComponentFixture<{stepper: MatStepper}>,
stepHeaders: DebugElement[],
)
| 1725 | |
| 1726 | /** Asserts that arrow key direction works correctly in RTL mode. */ |
| 1727 | function assertArrowKeyInteractionInRtl( |
| 1728 | fixture: ComponentFixture<{stepper: MatStepper}>, |
| 1729 | stepHeaders: DebugElement[], |
| 1730 | ) { |
| 1731 | const stepper = fixture.componentInstance.stepper; |
| 1732 | expect(stepper._getFocusIndex()).toBe(0); |
| 1733 | |
| 1734 | let stepHeaderEl = stepHeaders[0].nativeElement; |
| 1735 | dispatchKeyboardEvent(stepHeaderEl, 'keydown', LEFT_ARROW); |
| 1736 | fixture.detectChanges(); |
| 1737 | |
| 1738 | expect(stepper._getFocusIndex()).toBe(1); |
| 1739 | |
| 1740 | stepHeaderEl = stepHeaders[1].nativeElement; |
| 1741 | dispatchKeyboardEvent(stepHeaderEl, 'keydown', RIGHT_ARROW); |
| 1742 | fixture.detectChanges(); |
| 1743 | |
| 1744 | expect(stepper._getFocusIndex()).toBe(0); |
| 1745 | } |
| 1746 | |
| 1747 | /** Asserts that keyboard interaction works correctly when the user is pressing a modifier key. */ |
| 1748 | function assertSelectKeyWithModifierInteraction( |
no test coverage detected
searching dependent graphs…