Returns the current value of the slider.
(slider: ElementFinder, thumbPosition: Thumb)
| 111 | |
| 112 | /** Returns the current value of the slider. */ |
| 113 | async function getSliderValue(slider: ElementFinder, thumbPosition: Thumb): Promise<number> { |
| 114 | const inputs = await slider.all(by.css('.mdc-slider__input')); |
| 115 | return thumbPosition === Thumb.END |
| 116 | ? Number(await inputs[inputs.length - 1].getAttribute('value')) |
| 117 | : Number(await inputs[0].getAttribute('value')); |
| 118 | } |
| 119 | |
| 120 | /** Focuses on the MatSlider at the coordinates corresponding to the given thumb. */ |
| 121 | async function focusSliderThumb(slider: ElementFinder, thumbPosition: Thumb): Promise<void> { |
no test coverage detected