on xenial help sign in
We need to wait for heights here too
commita93f8702f6c63ef5d6916a91a24c05c9956a575c authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 13 Feb 2015, 12:40 (12 years ago) parentfd45a52
1 file changed+7
tests/qmltests/Notifications/tst_Notifications.qml+7
tests/qmltests/Notifications/tst_Notifications.qml+7
@@ -603,6 +603,13 @@ Item {
603603 compare(bodyLabel.visible, data.bodyVisible, "body-text visibility is incorrect")
604604 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
605605
606+ // After clicking the state of notifications can change so let's wait
607+ // for their height animations to finish before continuing
608+ for (var i = 0; i < mockModel.count; ++i) {
609+ var n = findChild(notifications, "notification" + i)
610+ tryCompare(n, "height", n.state === "contracted" ? units.gu(10) : n.implicitHeight);
611+ }
612+
606613 if (data.hasSound) {
607614 var audioItem = findInvisibleChild(notification, "sound")
608615 compare(audioItem.playbackState, data.hasSound ? Audio.PlayingState : Audio.StoppedState, "Audio has wrong state")