on xenial help sign in
Fix showErrorMessage test
889e0d9Michael Terry
qml/Greeter/CoverPage.qml+2−1
@@ -127,9 +127,10 @@ Showable {
127 color: "white"
127 color: "white"
128 font.weight: Font.Light
128 font.weight: Font.Light
129
129
130+ readonly property var opacityAnimation: showLabelAnimation // for testing
131+
130 SequentialAnimation on opacity {
132 SequentialAnimation on opacity {
131 id: showLabelAnimation
133 id: showLabelAnimation
132− objectName: "showLabelAnimation"
133 running: false
134 running: false
134 loops: 2
135 loops: 2
135
136
tests/qmltests/Greeter/tst_NarrowView.qml+3−4
@@ -540,16 +540,15 @@ Item {
540 var coverPage = findChild(view, "coverPage");
540 var coverPage = findChild(view, "coverPage");
541 var swipeHint = findChild(coverPage, "swipeHint");
541 var swipeHint = findChild(coverPage, "swipeHint");
542 var errorMessageAnimation = findInvisibleChild(coverPage, "errorMessageAnimation");
542 var errorMessageAnimation = findInvisibleChild(coverPage, "errorMessageAnimation");
543− var showLabelAnimation = findInvisibleChild(coverPage, "showLabelAnimation");
544
543
545 view.showErrorMessage("hello");
544 view.showErrorMessage("hello");
546 compare(swipeHint.text, "《 hello 》");
545 compare(swipeHint.text, "《 hello 》");
547 verify(errorMessageAnimation.running);
546 verify(errorMessageAnimation.running);
548− verify(showLabelAnimation.running);
547+ verify(swipeHint.opacityAnimation.running);
549
548
550 errorMessageAnimation.complete();
549 errorMessageAnimation.complete();
551− showLabelAnimation.complete();
550+ swipeHint.opacityAnimation.complete();
552− compare(swipeHint.text, "《 " + i18n.tr("Unlock") + " 》");
551+ tryCompare(swipeHint, "text", "《 " + i18n.tr("Unlock") + " 》");
553 }
552 }
554 }
553 }
555}
554}