on xenial help sign in
Fix test

We need to make sure we are pressing the handle before fake changing the height of the indicatorsMenu

commitb61cb5136791c4721a7f75732d5b2de27e98d18a authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 26 May 2015, 15:04 (11 years ago) parent1d2c86d
1 file changed+6
tests/qmltests/Panel/tst_IndicatorsMenu.qml+6
tests/qmltests/Panel/tst_IndicatorsMenu.qml+6
@@ -147,11 +147,17 @@ IndicatorTest {
147147 }
148148
149149 function test_progress_changes_state_to_reveal() {
150+ var firstItem = get_indicator_item(0);
151+ var firstItemMappedPosition = indicatorsMenu.mapFromItem(firstItem, firstItem.width/2, firstItem.height/2);
152+ touchPress(indicatorsMenu, firstItemMappedPosition.x, indicatorsMenu.minimizedPanelHeight / 2);
153+
150154 indicatorsMenu.height = indicatorsMenu.openedHeight / 2;
151155 compare(indicatorsMenu.state, "reveal", "Indicators should be revealing when partially opened.");
152156
153157 indicatorsMenu.height = indicatorsMenu.openedHeight;
154158 compare(indicatorsMenu.state, "reveal", "Indicators should still be revealing when fully opened.");
159+
160+ touchRelease(indicatorsMenu, firstItemMappedPosition.x, indicatorsMenu.minimizedPanelHeight / 2);
155161 }
156162
157163 function test_open_state() {