on xenial help sign in
Fix showErrorMessage test
commit889e0d9ec41f0a37d094a125b7d5259e8b92bfb0 authorMichael Terry <michael.terry@canonical.com> dateThu 16 Jun 2016, 16:28 (10 years ago) parentb943231
2 files changed+5−5
qml/Greeter/CoverPage.qml+2−1 tests/qmltests/Greeter/tst_NarrowView.qml+3−4
qml/Greeter/CoverPage.qml+2−1
@@ -127,9 +127,10 @@ Showable {
127127 color: "white"
128128 font.weight: Font.Light
129129
130+ readonly property var opacityAnimation: showLabelAnimation // for testing
131+
130132 SequentialAnimation on opacity {
131133 id: showLabelAnimation
132− objectName: "showLabelAnimation"
133134 running: false
134135 loops: 2
135136
tests/qmltests/Greeter/tst_NarrowView.qml+3−4
@@ -540,16 +540,15 @@ Item {
540540 var coverPage = findChild(view, "coverPage");
541541 var swipeHint = findChild(coverPage, "swipeHint");
542542 var errorMessageAnimation = findInvisibleChild(coverPage, "errorMessageAnimation");
543− var showLabelAnimation = findInvisibleChild(coverPage, "showLabelAnimation");
544543
545544 view.showErrorMessage("hello");
546545 compare(swipeHint.text, "《 hello 》");
547546 verify(errorMessageAnimation.running);
548− verify(showLabelAnimation.running);
547+ verify(swipeHint.opacityAnimation.running);
549548
550549 errorMessageAnimation.complete();
551− showLabelAnimation.complete();
552− compare(swipeHint.text, "《 " + i18n.tr("Unlock") + " 》");
550+ swipeHint.opacityAnimation.complete();
551+ tryCompare(swipeHint, "text", "《 " + i18n.tr("Unlock") + " 》");
553552 }
554553 }
555554}