Skip to content

Add simple tests for VolumeSlider

Heqro Iglens requested to merge heqro/elisa:volume_slider_test into master

VolumeSlider is a Slider that features a MouseArea inside it. This is a combination that I myself have broken from time to time. Hence, I add three simple test cases for reacting to clicks, for reacting to dragging while the mouse is pressed and for reacting to the user's wheel input.

The test case for the wheel input requires to expose a 'wheelEffect' property, which is consequence of the hack we use to avoid getting tickmarks. Its value is 5, because that's the hard-coded value we used to move the slider when the property didn't exist. Exposing this property makes sure that the test case won't fail if, say, the number 5 was exchanged for the number 6.

Edited by Heqro Iglens

Merge request reports