(
listItemElement: HTMLElement,
position: MatListOptionTogglePosition,
)
| 924 | |
| 925 | describe('with list item elements', () => { |
| 926 | function expectCheckboxAtPosition( |
| 927 | listItemElement: HTMLElement, |
| 928 | position: MatListOptionTogglePosition, |
| 929 | ) { |
| 930 | const containerSelector = |
| 931 | position === 'before' ? '.mdc-list-item__start' : 'mdc-list-item__end'; |
| 932 | const checkboxPositionClass = |
| 933 | position === 'before' |
| 934 | ? 'mdc-list-item--with-leading-checkbox' |
| 935 | : 'mdc-list-item--with-trailing-checkbox'; |
| 936 | expect(listItemElement.querySelector(`${containerSelector} .mdc-checkbox`)) |
| 937 | .withContext(`Expected checkbox to be aligned ${position}`) |
| 938 | .toBeDefined(); |
| 939 | expect(listItemElement.classList).toContain(checkboxPositionClass); |
| 940 | } |
| 941 | |
| 942 | /** |
| 943 | * Expects an icon to be shown at the given position. Also |
no outgoing calls
no test coverage detected