Merge lp:~saviq/unity8/dash-activity-indicator into lp:unity8
- dash-activity-indicator
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Andrea Cimitan |
Approved revision: | 1087 |
Merged at revision: | 1131 |
Proposed branch: | lp:~saviq/unity8/dash-activity-indicator |
Merge into: | lp:unity8 |
Prerequisite: | lp:~unity-team/unity8/scopes-v4 |
Diff against target: |
473 lines (+150/-98) 12 files modified
plugins/Dash/ScopeStyle.qml (+11/-8) qml/Components/PageHeader.qml (+1/-14) qml/Dash/Dash.qml (+68/-1) qml/Dash/DashContent.qml (+2/-0) qml/Dash/DashNavigationList.qml (+0/-5) qml/Dash/GenericScopeView.qml (+2/-1) qml/Dash/PreviewListView.qml (+27/-31) tests/autopilot/unity8/shell/emulators/dash.py (+1/-1) tests/plugins/Dash/tst_ScopeStyle.qml (+14/-7) tests/qmltests/Components/tst_PageHeader.qml (+0/-23) tests/qmltests/Dash/tst_Dash.qml (+23/-6) tests/qmltests/Dash/tst_GenericScopeView.qml (+1/-1) |
To merge this branch: | bzr merge lp:~saviq/unity8/dash-activity-indicator |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrea Cimitan (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Albert Astals Cid | Pending | ||
Review via email: mp+229805@code.launchpad.net |
This proposal supersedes a proposal from 2014-07-29.
Commit message
Refactor dash activity indicator.
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
No.
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes.
* Did you make sure that your branch does not contain spurious tags?
Yes.
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
* If you changed the UI, has there been a design review?
Yes, there was. And will be again.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1082
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal | # |
See inline
Michał Sawicz (saviq) : Posted in a previous version of this proposal | # |
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1083
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1084
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
Text conflict in tests/qmltests/
1 conflicts encountered.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1085
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
There are autopilot failures related to autopilot, can you have a look?
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
err, autopilot failures related to indicators i mean :D
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1086
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1087
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Andrea Cimitan (cimi) wrote : | # |
Apart seeing if CI will pass, I tested locally twice and works fine
* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
* Did CI run pass? If not, please explain why.
Waiting CI
Preview Diff
1 | === modified file 'plugins/Dash/ScopeStyle.qml' | |||
2 | --- plugins/Dash/ScopeStyle.qml 2014-07-18 18:09:13 +0000 | |||
3 | +++ plugins/Dash/ScopeStyle.qml 2014-08-06 14:50:51 +0000 | |||
4 | @@ -38,14 +38,20 @@ | |||
5 | 38 | /// Color used for text and symbolic icons | 38 | /// Color used for text and symbolic icons |
6 | 39 | readonly property color foreground: "foreground-color" in style ? style["foreground-color"] : d.defaultDark | 39 | readonly property color foreground: "foreground-color" in style ? style["foreground-color"] : d.defaultDark |
7 | 40 | 40 | ||
8 | 41 | /// Luminance of the foreground color | ||
9 | 42 | readonly property real foregroundLuminance: foreground ? luminance(foreground) : d.defaultForegroundLuminance | ||
10 | 43 | |||
11 | 41 | /// Color used for the overall background | 44 | /// Color used for the overall background |
12 | 42 | readonly property color background: "background-color" in style ? style["background-color"] : "transparent" | 45 | readonly property color background: "background-color" in style ? style["background-color"] : "transparent" |
13 | 43 | 46 | ||
14 | 47 | /// Luminance of the foreground color | ||
15 | 48 | readonly property real backgroundLuminance: background ? luminance(background) : d.defaultBackgroundLuminance | ||
16 | 49 | |||
17 | 44 | /*! \brief Luminance threshold for switching between fore and background color | 50 | /*! \brief Luminance threshold for switching between fore and background color |
18 | 45 | 51 | ||
19 | 46 | \note If background colour is not fully opaque, it's not taken into account. | 52 | \note If background colour is not fully opaque, it's not taken into account. |
20 | 47 | */ | 53 | */ |
22 | 48 | readonly property real threshold: background.a !== 1.0 ? d.foregroundLuminance : (d.foregroundLuminance + d.backgroundLuminance) / 2 | 54 | readonly property real threshold: background.a !== 1.0 ? foregroundLuminance : (foregroundLuminance + backgroundLuminance) / 2 |
23 | 49 | 55 | ||
24 | 50 | /*! \brief The lighter of foreground and background colors | 56 | /*! \brief The lighter of foreground and background colors |
25 | 51 | 57 | ||
26 | @@ -53,8 +59,8 @@ | |||
27 | 53 | and defaults to the theme-provided light color. | 59 | and defaults to the theme-provided light color. |
28 | 54 | */ | 60 | */ |
29 | 55 | readonly property color light: { | 61 | readonly property color light: { |
32 | 56 | if (background.a !== 1.0) return d.foregroundLuminance > d.defaultLightLuminance ? foreground : d.defaultLight; | 62 | if (background.a !== 1.0) return foregroundLuminance > d.defaultLightLuminance ? foreground : d.defaultLight; |
33 | 57 | return d.foregroundLuminance > d.backgroundLuminance ? foreground : background; | 63 | return foregroundLuminance > backgroundLuminance ? foreground : background; |
34 | 58 | } | 64 | } |
35 | 59 | 65 | ||
36 | 60 | /*! \brief The darker of foreground and background colors | 66 | /*! \brief The darker of foreground and background colors |
37 | @@ -63,8 +69,8 @@ | |||
38 | 63 | and defaults to the theme-provided dark color. | 69 | and defaults to the theme-provided dark color. |
39 | 64 | */ | 70 | */ |
40 | 65 | readonly property color dark: { | 71 | readonly property color dark: { |
43 | 66 | if (background.a !== 1.0) return d.foregroundLuminance < d.defaultDarkLuminance ? foreground : d.defaultDark; | 72 | if (background.a !== 1.0) return foregroundLuminance < d.defaultDarkLuminance ? foreground : d.defaultDark; |
44 | 67 | return d.foregroundLuminance < d.backgroundLuminance ? foreground : background; | 73 | return foregroundLuminance < backgroundLuminance ? foreground : background; |
45 | 68 | } | 74 | } |
46 | 69 | 75 | ||
47 | 70 | /// Source of the logo image for the header | 76 | /// Source of the logo image for the header |
48 | @@ -78,9 +84,6 @@ | |||
49 | 78 | 84 | ||
50 | 79 | //! @cond | 85 | //! @cond |
51 | 80 | property var d: QtObject { | 86 | property var d: QtObject { |
52 | 81 | readonly property real foregroundLuminance: luminance(foreground) | ||
53 | 82 | readonly property real backgroundLuminance: luminance(background) | ||
54 | 83 | |||
55 | 84 | // FIXME: should be taken from the theme | 87 | // FIXME: should be taken from the theme |
56 | 85 | readonly property color defaultLight: "white" | 88 | readonly property color defaultLight: "white" |
57 | 86 | readonly property color defaultDark: "grey" | 89 | readonly property color defaultDark: "grey" |
58 | 87 | 90 | ||
59 | === modified file 'qml/Components/PageHeader.qml' | |||
60 | --- qml/Components/PageHeader.qml 2014-07-31 16:49:50 +0000 | |||
61 | +++ qml/Components/PageHeader.qml 2014-08-06 14:50:51 +0000 | |||
62 | @@ -32,7 +32,6 @@ | |||
63 | 32 | property bool searchEntryEnabled: false | 32 | property bool searchEntryEnabled: false |
64 | 33 | property ListModel searchHistory: SearchHistoryModel | 33 | property ListModel searchHistory: SearchHistoryModel |
65 | 34 | property alias searchQuery: searchTextField.text | 34 | property alias searchQuery: searchTextField.text |
66 | 35 | property bool searchInProgress: false | ||
67 | 36 | 35 | ||
68 | 37 | property alias bottomItem: bottomContainer.children | 36 | property alias bottomItem: bottomContainer.children |
69 | 38 | 37 | ||
70 | @@ -200,25 +199,13 @@ | |||
71 | 200 | anchors.fill: parent | 199 | anchors.fill: parent |
72 | 201 | anchors.margins: units.gu(.75) | 200 | anchors.margins: units.gu(.75) |
73 | 202 | source: "image://theme/clear" | 201 | source: "image://theme/clear" |
75 | 203 | opacity: searchTextField.text.length > 0 && !searchActivityIndicator.running | 202 | opacity: searchTextField.text.length > 0 |
76 | 204 | visible: opacity > 0 | 203 | visible: opacity > 0 |
77 | 205 | Behavior on opacity { | 204 | Behavior on opacity { |
78 | 206 | UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration } | 205 | UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration } |
79 | 207 | } | 206 | } |
80 | 208 | } | 207 | } |
81 | 209 | 208 | ||
82 | 210 | ActivityIndicator { | ||
83 | 211 | id: searchActivityIndicator | ||
84 | 212 | objectName: "searchIndicator" | ||
85 | 213 | anchors.fill: parent | ||
86 | 214 | anchors.margins: units.gu(.75) | ||
87 | 215 | running: root.searchInProgress | ||
88 | 216 | opacity: running ? 1 : 0 | ||
89 | 217 | Behavior on opacity { | ||
90 | 218 | UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration } | ||
91 | 219 | } | ||
92 | 220 | } | ||
93 | 221 | |||
94 | 222 | onClicked: { | 209 | onClicked: { |
95 | 223 | root.resetSearch(true); | 210 | root.resetSearch(true); |
96 | 224 | root.openSearchHistory(); | 211 | root.openSearchHistory(); |
97 | 225 | 212 | ||
98 | === modified file 'qml/Dash/Dash.qml' | |||
99 | --- qml/Dash/Dash.qml 2014-08-06 14:50:51 +0000 | |||
100 | +++ qml/Dash/Dash.qml 2014-08-06 14:50:51 +0000 | |||
101 | @@ -14,7 +14,7 @@ | |||
102 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
103 | 15 | */ | 15 | */ |
104 | 16 | 16 | ||
106 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.2 |
107 | 18 | import Ubuntu.Components 0.1 | 18 | import Ubuntu.Components 0.1 |
108 | 19 | import Unity 0.2 | 19 | import Unity 0.2 |
109 | 20 | import Utils 0.1 | 20 | import Utils 0.1 |
110 | @@ -132,4 +132,71 @@ | |||
111 | 132 | } | 132 | } |
112 | 133 | } | 133 | } |
113 | 134 | } | 134 | } |
114 | 135 | |||
115 | 136 | Rectangle { | ||
116 | 137 | id: indicator | ||
117 | 138 | objectName: "processingIndicator" | ||
118 | 139 | anchors { | ||
119 | 140 | left: parent.left | ||
120 | 141 | right: parent.right | ||
121 | 142 | bottom: parent.bottom | ||
122 | 143 | } | ||
123 | 144 | height: units.dp(3) | ||
124 | 145 | color: scopeStyle.backgroundLuminance > 0.7 ? "#50000000" : "#50ffffff" | ||
125 | 146 | opacity: 0 | ||
126 | 147 | visible: opacity > 0 | ||
127 | 148 | |||
128 | 149 | readonly property bool processing: dashContent.processing || scopeItem.processing | ||
129 | 150 | |||
130 | 151 | Behavior on opacity { | ||
131 | 152 | UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration } | ||
132 | 153 | } | ||
133 | 154 | |||
134 | 155 | onProcessingChanged: { | ||
135 | 156 | if (processing) delay.start(); | ||
136 | 157 | else if (!persist.running) indicator.opacity = 0; | ||
137 | 158 | } | ||
138 | 159 | |||
139 | 160 | Timer { | ||
140 | 161 | id: delay | ||
141 | 162 | interval: 200 | ||
142 | 163 | onTriggered: if (indicator.processing) { | ||
143 | 164 | persist.restart(); | ||
144 | 165 | indicator.opacity = 1; | ||
145 | 166 | } | ||
146 | 167 | } | ||
147 | 168 | |||
148 | 169 | Timer { | ||
149 | 170 | id: persist | ||
150 | 171 | interval: 2 * UbuntuAnimation.SleepyDuration - UbuntuAnimation.FastDuration | ||
151 | 172 | onTriggered: if (!indicator.processing) indicator.opacity = 0 | ||
152 | 173 | } | ||
153 | 174 | |||
154 | 175 | Rectangle { | ||
155 | 176 | id: orange | ||
156 | 177 | anchors { top: parent.top; bottom: parent.bottom } | ||
157 | 178 | width: parent.width / 4 | ||
158 | 179 | color: Theme.palette.selected.foreground | ||
159 | 180 | |||
160 | 181 | SequentialAnimation { | ||
161 | 182 | running: indicator.visible | ||
162 | 183 | loops: Animation.Infinite | ||
163 | 184 | XAnimator { | ||
164 | 185 | from: -orange.width / 2 | ||
165 | 186 | to: indicator.width - orange.width / 2 | ||
166 | 187 | duration: UbuntuAnimation.SleepyDuration | ||
167 | 188 | easing.type: Easing.InOutSine | ||
168 | 189 | target: orange | ||
169 | 190 | } | ||
170 | 191 | XAnimator { | ||
171 | 192 | from: indicator.width - orange.width / 2 | ||
172 | 193 | to: -orange.width / 2 | ||
173 | 194 | duration: UbuntuAnimation.SleepyDuration | ||
174 | 195 | easing.type: Easing.InOutSine | ||
175 | 196 | target: orange | ||
176 | 197 | } | ||
177 | 198 | } | ||
178 | 199 | } | ||
179 | 200 | } | ||
180 | 201 | |||
181 | 135 | } | 202 | } |
182 | 136 | 203 | ||
183 | === modified file 'qml/Dash/DashContent.qml' | |||
184 | --- qml/Dash/DashContent.qml 2014-08-06 14:50:51 +0000 | |||
185 | +++ qml/Dash/DashContent.qml 2014-08-06 14:50:51 +0000 | |||
186 | @@ -25,6 +25,8 @@ | |||
187 | 25 | 25 | ||
188 | 26 | property alias scopes: dashContentList.model | 26 | property alias scopes: dashContentList.model |
189 | 27 | readonly property alias currentIndex: dashContentList.currentIndex | 27 | readonly property alias currentIndex: dashContentList.currentIndex |
190 | 28 | readonly property bool processing: dashContentList.currentItem && dashContentList.currentItem.item | ||
191 | 29 | && dashContentList.currentItem.item.processing || false | ||
192 | 28 | 30 | ||
193 | 29 | signal scopeLoaded(string scopeId) | 31 | signal scopeLoaded(string scopeId) |
194 | 30 | signal gotoScope(string scopeId) | 32 | signal gotoScope(string scopeId) |
195 | 31 | 33 | ||
196 | === modified file 'qml/Dash/DashNavigationList.qml' | |||
197 | --- qml/Dash/DashNavigationList.qml 2014-08-06 14:50:51 +0000 | |||
198 | +++ qml/Dash/DashNavigationList.qml 2014-08-06 14:50:51 +0000 | |||
199 | @@ -35,11 +35,6 @@ | |||
200 | 35 | anchors.fill: parent | 35 | anchors.fill: parent |
201 | 36 | } | 36 | } |
202 | 37 | 37 | ||
203 | 38 | ActivityIndicator { | ||
204 | 39 | id: loadingIndicator | ||
205 | 40 | anchors.centerIn: parent | ||
206 | 41 | running: !(navigation && navigation.loaded) | ||
207 | 42 | } | ||
208 | 43 | clip: true | 38 | clip: true |
209 | 44 | 39 | ||
210 | 45 | Behavior on height { | 40 | Behavior on height { |
211 | 46 | 41 | ||
212 | === modified file 'qml/Dash/GenericScopeView.qml' | |||
213 | --- qml/Dash/GenericScopeView.qml 2014-08-06 14:50:51 +0000 | |||
214 | +++ qml/Dash/GenericScopeView.qml 2014-08-06 14:50:51 +0000 | |||
215 | @@ -38,6 +38,8 @@ | |||
216 | 38 | style: scope ? scope.customizations : {} | 38 | style: scope ? scope.customizations : {} |
217 | 39 | } | 39 | } |
218 | 40 | 40 | ||
219 | 41 | readonly property bool processing: scope ? scope.searchInProgress || previewListView.processing : false | ||
220 | 42 | |||
221 | 41 | signal backClicked() | 43 | signal backClicked() |
222 | 42 | 44 | ||
223 | 43 | function positionAtBeginning() { | 45 | function positionAtBeginning() { |
224 | @@ -379,7 +381,6 @@ | |||
225 | 379 | title: scopeView.scope ? scopeView.scope.name : "" | 381 | title: scopeView.scope ? scopeView.scope.name : "" |
226 | 380 | showBackButton: scopeView.hasBackAction | 382 | showBackButton: scopeView.hasBackAction |
227 | 381 | searchEntryEnabled: true | 383 | searchEntryEnabled: true |
228 | 382 | searchInProgress: scopeView.scope ? scopeView.scope.searchInProgress : false | ||
229 | 383 | scopeStyle: scopeView.scopeStyle | 384 | scopeStyle: scopeView.scopeStyle |
230 | 384 | 385 | ||
231 | 385 | bottomItem: DashNavigation { | 386 | bottomItem: DashNavigation { |
232 | 386 | 387 | ||
233 | === modified file 'qml/Dash/PreviewListView.qml' | |||
234 | --- qml/Dash/PreviewListView.qml 2014-07-17 13:10:45 +0000 | |||
235 | +++ qml/Dash/PreviewListView.qml 2014-08-06 14:50:51 +0000 | |||
236 | @@ -32,6 +32,9 @@ | |||
237 | 32 | property alias currentItem: previewListView.currentItem | 32 | property alias currentItem: previewListView.currentItem |
238 | 33 | property alias count: previewListView.count | 33 | property alias count: previewListView.count |
239 | 34 | 34 | ||
240 | 35 | readonly property bool processing: currentItem && (!currentItem.previewModel.loaded | ||
241 | 36 | || currentItem.previewModel.processingAction) | ||
242 | 37 | |||
243 | 35 | PageHeader { | 38 | PageHeader { |
244 | 36 | id: header | 39 | id: header |
245 | 37 | objectName: "pageHeader" | 40 | objectName: "pageHeader" |
246 | @@ -83,39 +86,32 @@ | |||
247 | 83 | } | 86 | } |
248 | 84 | } | 87 | } |
249 | 85 | 88 | ||
252 | 86 | delegate: Item { | 89 | delegate: Previews.Preview { |
253 | 87 | objectName: "previewItem" + index | 90 | id: preview |
254 | 91 | objectName: "preview" + index | ||
255 | 88 | height: previewListView.height | 92 | height: previewListView.height |
256 | 89 | width: previewListView.width | 93 | width: previewListView.width |
257 | 90 | 94 | ||
287 | 91 | readonly property bool ready: preview.previewModel.loaded | 95 | isCurrent: ListView.isCurrentItem |
288 | 92 | 96 | ||
289 | 93 | Previews.Preview { | 97 | previewModel: { |
290 | 94 | id: preview | 98 | var previewStack = root.scope.preview(result); |
291 | 95 | objectName: "preview" + index | 99 | return previewStack.getPreviewModel(0); |
292 | 96 | anchors.fill: parent | 100 | } |
293 | 97 | 101 | scopeStyle: root.scopeStyle | |
294 | 98 | isCurrent: parent.ListView.isCurrentItem | 102 | } |
295 | 99 | 103 | } | |
296 | 100 | previewModel: { | 104 | |
297 | 101 | var previewStack = root.scope.preview(result); | 105 | MouseArea { |
298 | 102 | return previewStack.getPreviewModel(0); | 106 | id: processingMouseArea |
299 | 103 | } | 107 | objectName: "processingMouseArea" |
300 | 104 | scopeStyle: root.scopeStyle | 108 | anchors { |
301 | 105 | } | 109 | left: parent.left |
302 | 106 | 110 | right: parent.right | |
303 | 107 | MouseArea { | 111 | top: pageHeader.bottom |
304 | 108 | id: processingMouseArea | 112 | bottom: parent.bottom |
305 | 109 | objectName: "processingMouseArea" | 113 | } |
306 | 110 | anchors.fill: parent | 114 | |
307 | 111 | enabled: !preview.previewModel.loaded || preview.previewModel.processingAction | 115 | enabled: root.processing |
279 | 112 | |||
280 | 113 | ActivityIndicator { | ||
281 | 114 | anchors.centerIn: parent | ||
282 | 115 | visible: root.open && parent.enabled | ||
283 | 116 | running: visible | ||
284 | 117 | } | ||
285 | 118 | } | ||
286 | 119 | } | ||
308 | 120 | } | 116 | } |
309 | 121 | } | 117 | } |
310 | 122 | 118 | ||
311 | === modified file 'tests/autopilot/unity8/shell/emulators/dash.py' | |||
312 | --- tests/autopilot/unity8/shell/emulators/dash.py 2014-07-29 19:49:36 +0000 | |||
313 | +++ tests/autopilot/unity8/shell/emulators/dash.py 2014-08-06 14:50:51 +0000 | |||
314 | @@ -150,7 +150,7 @@ | |||
315 | 150 | headerContainer.contentY.wait_for(0) | 150 | headerContainer.contentY.wait_for(0) |
316 | 151 | search_text_field = self._get_search_text_field() | 151 | search_text_field = self._get_search_text_field() |
317 | 152 | search_text_field.write(query) | 152 | search_text_field.write(query) |
319 | 153 | current_header.select_single(objectName="searchIndicator").running.wait_for(False) | 153 | self.select_single(objectName="processingIndicator").visible.wait_for(False) |
320 | 154 | 154 | ||
321 | 155 | def _get_search_text_field(self): | 155 | def _get_search_text_field(self): |
322 | 156 | page_header = self._get_current_page_header() | 156 | page_header = self._get_current_page_header() |
323 | 157 | 157 | ||
324 | === modified file 'tests/plugins/Dash/tst_ScopeStyle.qml' | |||
325 | --- tests/plugins/Dash/tst_ScopeStyle.qml 2014-07-19 07:56:55 +0000 | |||
326 | +++ tests/plugins/Dash/tst_ScopeStyle.qml 2014-08-06 14:50:51 +0000 | |||
327 | @@ -54,6 +54,9 @@ | |||
328 | 54 | { tag: "lightgrey", luminance: 0.8275 }, | 54 | { tag: "lightgrey", luminance: 0.8275 }, |
329 | 55 | { tag: "grey", luminance: 0.5020 }, | 55 | { tag: "grey", luminance: 0.5020 }, |
330 | 56 | { tag: "darkgrey", luminance: 0.6627 }, | 56 | { tag: "darkgrey", luminance: 0.6627 }, |
331 | 57 | { tag: "red", luminance: 0.2126 }, | ||
332 | 58 | { tag: "green", luminance: 0.3590 }, | ||
333 | 59 | { tag: "blue", luminance: 0.0722 }, | ||
334 | 57 | ]; | 60 | ]; |
335 | 58 | } | 61 | } |
336 | 59 | 62 | ||
337 | @@ -64,10 +67,10 @@ | |||
338 | 64 | 67 | ||
339 | 65 | function test_foreground_data() { | 68 | function test_foreground_data() { |
340 | 66 | return [ | 69 | return [ |
345 | 67 | { tag: "default", index: 0, foreground: "grey" }, | 70 | { tag: "default", index: 0, foreground: "grey", luminance: 0.5020 }, |
346 | 68 | { tag: "red on black", index: 1, foreground: "red" }, | 71 | { tag: "red on black", index: 1, foreground: "red", luminance: 0.2126 }, |
347 | 69 | { tag: "green on white", index: 2, foreground: "green" }, | 72 | { tag: "green on white", index: 2, foreground: "green", luminance: 0.3590 }, |
348 | 70 | { tag: "blue on darkgrey", index: 3, foreground: "blue" }, | 73 | { tag: "blue on darkgrey", index: 3, foreground: "blue", luminance: 0.0722 }, |
349 | 71 | ]; | 74 | ]; |
350 | 72 | } | 75 | } |
351 | 73 | 76 | ||
352 | @@ -75,14 +78,15 @@ | |||
353 | 75 | tool.style = testCase.styles[data.index]; | 78 | tool.style = testCase.styles[data.index]; |
354 | 76 | verify(Qt.colorEqual(tool.foreground, data.foreground), | 79 | verify(Qt.colorEqual(tool.foreground, data.foreground), |
355 | 77 | "Foreground color not equal: %1 != %2".arg(tool.foreground).arg(data.foreground)); | 80 | "Foreground color not equal: %1 != %2".arg(tool.foreground).arg(data.foreground)); |
356 | 81 | compare(tool.foregroundLuminance.toFixed(4), data.luminance.toFixed(4)); | ||
357 | 78 | } | 82 | } |
358 | 79 | 83 | ||
359 | 80 | function test_background_data() { | 84 | function test_background_data() { |
360 | 81 | return [ | 85 | return [ |
361 | 82 | { tag: "default", index: 0, background: "transparent" }, | 86 | { tag: "default", index: 0, background: "transparent" }, |
365 | 83 | { tag: "red on black", index: 1, background: "black" }, | 87 | { tag: "red on black", index: 1, background: "black", luminance: 0 }, |
366 | 84 | { tag: "green on white", index: 2, background: "white" }, | 88 | { tag: "green on white", index: 2, background: "white", luminance: 1 }, |
367 | 85 | { tag: "blue on darkgrey", index: 3, background: "darkgrey" }, | 89 | { tag: "blue on darkgrey", index: 3, background: "darkgrey", luminance: 0.6627 }, |
368 | 86 | ]; | 90 | ]; |
369 | 87 | } | 91 | } |
370 | 88 | 92 | ||
371 | @@ -90,6 +94,9 @@ | |||
372 | 90 | tool.style = testCase.styles[data.index]; | 94 | tool.style = testCase.styles[data.index]; |
373 | 91 | verify(Qt.colorEqual(tool.background, data.background), | 95 | verify(Qt.colorEqual(tool.background, data.background), |
374 | 92 | "Background color not equal: %1 != %2".arg(tool.background).arg(data.background)); | 96 | "Background color not equal: %1 != %2".arg(tool.background).arg(data.background)); |
375 | 97 | if (data.hasOwnProperty("luminance")) { | ||
376 | 98 | compare(tool.backgroundLuminance.toFixed(4), data.luminance.toFixed(4)); | ||
377 | 99 | } | ||
378 | 93 | } | 100 | } |
379 | 94 | 101 | ||
380 | 95 | function test_threshold_data() { | 102 | function test_threshold_data() { |
381 | 96 | 103 | ||
382 | === modified file 'tests/qmltests/Components/tst_PageHeader.qml' | |||
383 | --- tests/qmltests/Components/tst_PageHeader.qml 2014-07-28 09:14:23 +0000 | |||
384 | +++ tests/qmltests/Components/tst_PageHeader.qml 2014-08-06 14:50:51 +0000 | |||
385 | @@ -119,29 +119,6 @@ | |||
386 | 119 | compare(pageHeader.searchHistory.get(0).query, "humppa4") | 119 | compare(pageHeader.searchHistory.get(0).query, "humppa4") |
387 | 120 | } | 120 | } |
388 | 121 | 121 | ||
389 | 122 | function test_search_indicator() { | ||
390 | 123 | var searchIndicator = findChild(pageHeader, "searchIndicator") | ||
391 | 124 | var clearIcon = findChild(pageHeader, "clearIcon") | ||
392 | 125 | |||
393 | 126 | pageHeader.triggerSearch() | ||
394 | 127 | |||
395 | 128 | tryCompare(clearIcon, "visible", false) | ||
396 | 129 | pageHeader.searchQuery = "ubuntu" | ||
397 | 130 | tryCompare(clearIcon, "visible", true) | ||
398 | 131 | |||
399 | 132 | pageHeader.searchInProgress = false | ||
400 | 133 | compare(searchIndicator.running, false, "Search indicator is running.") | ||
401 | 134 | tryCompare(clearIcon, "visible", true) | ||
402 | 135 | |||
403 | 136 | pageHeader.searchInProgress = true | ||
404 | 137 | compare(searchIndicator.running, true, "Search indicator isn't running.") | ||
405 | 138 | tryCompare(clearIcon, "visible", false) | ||
406 | 139 | |||
407 | 140 | pageHeader.searchInProgress = false; | ||
408 | 141 | compare(searchIndicator.running, false, "Search indicator is running.") | ||
409 | 142 | tryCompare(clearIcon, "visible", true) | ||
410 | 143 | } | ||
411 | 144 | |||
412 | 145 | function test_titleImage() { | 122 | function test_titleImage() { |
413 | 146 | 123 | ||
414 | 147 | var titleImage = findChild(pageHeader, "titleImage"); | 124 | var titleImage = findChild(pageHeader, "titleImage"); |
415 | 148 | 125 | ||
416 | === modified file 'tests/qmltests/Dash/tst_Dash.qml' | |||
417 | --- tests/qmltests/Dash/tst_Dash.qml 2014-08-06 14:50:51 +0000 | |||
418 | +++ tests/qmltests/Dash/tst_Dash.qml 2014-08-06 14:50:51 +0000 | |||
419 | @@ -45,12 +45,8 @@ | |||
420 | 45 | name: "Dash" | 45 | name: "Dash" |
421 | 46 | when: windowShown | 46 | when: windowShown |
422 | 47 | 47 | ||
429 | 48 | property var scopes | 48 | readonly property Item dashContent: findChild(dash, "dashContent"); |
430 | 49 | 49 | readonly property var scopes: dashContent.scopes | |
425 | 50 | Component.onCompleted: { | ||
426 | 51 | var dashContent = findChild(dash, "dashContent"); | ||
427 | 52 | scopes = dashContent.scopes; | ||
428 | 53 | } | ||
431 | 54 | 50 | ||
432 | 55 | function init() { | 51 | function init() { |
433 | 56 | // clear and reload the scopes. | 52 | // clear and reload the scopes. |
434 | @@ -106,5 +102,26 @@ | |||
435 | 106 | dashCommunicatorService.mockSetCurrentScope("clickscope", true, true); | 102 | dashCommunicatorService.mockSetCurrentScope("clickscope", true, true); |
436 | 107 | tryCompare(dashContentList, "currentIndex", 1) | 103 | tryCompare(dashContentList, "currentIndex", 1) |
437 | 108 | } | 104 | } |
438 | 105 | |||
439 | 106 | function test_processing_indicator() { | ||
440 | 107 | tryCompare(scopes, "loaded", true); | ||
441 | 108 | |||
442 | 109 | var processingIndicator = findChild(dash, "processingIndicator"); | ||
443 | 110 | verify(processingIndicator, "Can't find the processing indicator."); | ||
444 | 111 | |||
445 | 112 | verify(!processingIndicator.visible, "Processing indicator should be visible."); | ||
446 | 113 | |||
447 | 114 | tryCompareFunction(function() { | ||
448 | 115 | return scopes.getScope(dashContent.currentIndex) != null; | ||
449 | 116 | }, true); | ||
450 | 117 | var currentScope = scopes.getScope(dashContent.currentIndex); | ||
451 | 118 | verify(currentScope, "Can't find the current scope."); | ||
452 | 119 | |||
453 | 120 | currentScope.setSearchInProgress(true); | ||
454 | 121 | tryCompare(processingIndicator, "visible", true); | ||
455 | 122 | |||
456 | 123 | currentScope.setSearchInProgress(false); | ||
457 | 124 | tryCompare(processingIndicator, "visible", false); | ||
458 | 125 | } | ||
459 | 109 | } | 126 | } |
460 | 110 | } | 127 | } |
461 | 111 | 128 | ||
462 | === modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml' | |||
463 | --- tests/qmltests/Dash/tst_GenericScopeView.qml 2014-07-24 20:40:57 +0000 | |||
464 | +++ tests/qmltests/Dash/tst_GenericScopeView.qml 2014-08-06 14:50:51 +0000 | |||
465 | @@ -319,7 +319,7 @@ | |||
466 | 319 | units.gu(2), | 319 | units.gu(2), |
467 | 320 | testCase.previewListView.height / 2); | 320 | testCase.previewListView.height / 2); |
468 | 321 | tryCompare(previewListViewList, "moving", false); | 321 | tryCompare(previewListViewList, "moving", false); |
470 | 322 | tryCompare(testCase.previewListView.currentItem, "objectName", "previewItem" + i); | 322 | tryCompare(testCase.previewListView.currentItem, "objectName", "preview" + i); |
471 | 323 | 323 | ||
472 | 324 | } | 324 | } |
473 | 325 | closePreview(); | 325 | closePreview(); |
FAILED: Continuous integration, rev:1078 /code.launchpad .net/~saviq/ unity8/ dash-activity- indicator/ +merge/ 228718/ +edit-commit- message
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http:// jenkins. qa.ubuntu. com/job/ unity8- ci/3664/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/2670 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- utopic/ 666 jenkins. qa.ubuntu. com/job/ unity8- utopic- amd64-ci/ 758 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 758 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 758/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- utopic- i386-ci/ 758 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/2793 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/3913 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/3913/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 10636
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/3664/ rebuild
http://