Merge lp:~mzanetti/unity8/snap-decision-states-wait-- into lp:~macslow/unity8/snap-decisions-states

Proposed by Michael Zanetti
Status: Merged
Merged at revision: 547
Proposed branch: lp:~mzanetti/unity8/snap-decision-states-wait--
Merge into: lp:~macslow/unity8/snap-decisions-states
Diff against target: 29 lines (+7/-1)
2 files modified
qml/Notifications/Notification.qml (+1/-0)
tests/qmltests/Notifications/tst_Notifications.qml (+6/-1)
To merge this branch: bzr merge lp:~mzanetti/unity8/snap-decision-states-wait--
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+211390@code.launchpad.net

This proposal supersedes a proposal from 2014-03-17.

Commit message

get rid of one of the waits

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Notifications/Notification.qml'
2--- qml/Notifications/Notification.qml 2014-03-17 15:12:32 +0000
3+++ qml/Notifications/Notification.qml 2014-03-17 18:55:06 +0000
4@@ -169,6 +169,7 @@
5
6 Column {
7 id: contentColumn
8+ objectName: "contentColumn"
9
10 anchors {
11 left: parent.left
12
13=== modified file 'tests/qmltests/Notifications/tst_Notifications.qml'
14--- tests/qmltests/Notifications/tst_Notifications.qml 2014-02-21 13:40:36 +0000
15+++ tests/qmltests/Notifications/tst_Notifications.qml 2014-03-17 18:55:06 +0000
16@@ -444,7 +444,12 @@
17
18 // click to expand
19 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
20- wait(500);
21+ var contentColumn = findChild(notification, "contentColumn")
22+ var collapsedContentColumnHeight = contentColumn.height;
23+ // Waiting for the inner column to change height because buttons appear
24+ tryCompareFunction(function() { return collapsedContentColumnHeight != contentColumn.height; }, true);
25+ // Waiting for notification to reach its target size
26+ tryCompare(notification, "height", contentColumn.height + contentColumn.spacing * 2)
27 actionSpy.clear()
28
29 // test the additional buttons

Subscribers

People subscribed via source and target branches