on xenial help sign in
Fix panel test by making verifying synchronous

This fixes panel test by making verifying synchronous to avoid interfering with touchFlick function.

commit8a0b6f5a68820a3ba90201636c8b648f4eeafc88 authorMarius Gripsgard <marius@ubports.com> dateSun 15 Sep 2019, 02:04 (7 years ago) parentf99e28f
1 file changed+2−4
tests/qmltests/Tutorial/tst_Tutorial.qml+2−4
tests/qmltests/Tutorial/tst_Tutorial.qml+2−4
@@ -586,8 +586,6 @@ Rectangle {
586586 }
587587
588588 function test_tutorialRightShortDrag() {
589− skip("This test interferes with test_tutorialRightAutoSkipped. If" +
590− " one runs before the other, the second one will fail. FIXME");
591589 var tutorial = findChild(shell, "tutorial");
592590 var tutorialRight = findChild(tutorial, "tutorialRight");
593591 var stage = findChild(shell, "stage");
@@ -596,9 +594,9 @@ Rectangle {
596594 touchFlick(shell, shell.width, halfHeight, shell.width * 0.8, halfHeight, true, false);
597595 // compare opacity with a bound rather than hard 0.6 because progress doesn't
598596 // always match the drag perfectly (takes a moment for drag to kick in)
599− tryCompareFunction(function() {
597+ verify(function() {
600598 return tutorialRight.opacity >= 0.6 && tutorialRight.opacity < 0.8;
601− }, true);
599+ });
602600 touchFlick(shell, shell.width, halfHeight, shell.width * 0.8, halfHeight, false, true);
603601
604602 compare(tutorialRight.shown, true);