Merge lp:~nick-dedekind/unity8/lp1264678-indicator.misalignment into lp:unity8
- lp1264678-indicator.misalignment
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | MichaĆ Sawicz |
Approved revision: | 624 |
Merged at revision: | 640 |
Proposed branch: | lp:~nick-dedekind/unity8/lp1264678-indicator.misalignment |
Merge into: | lp:unity8 |
Diff against target: |
517 lines (+183/-100) 10 files modified
qml/Panel/IndicatorRow.qml (+51/-29) qml/Panel/Indicators.qml (+46/-34) qml/Panel/MenuContent.qml (+2/-2) tests/mocks/Unity/Indicators/IndicatorsModel.qml (+2/-5) tests/mocks/Unity/Indicators/qml/fake_menu_widget2.qml (+1/-3) tests/mocks/Unity/Indicators/qml/fake_menu_widget3.qml (+1/-1) tests/qmltests/Panel/tst_IndicatorRow.qml (+2/-1) tests/qmltests/Panel/tst_Indicators.qml (+62/-11) tests/qmltests/Panel/tst_MenuContent.qml (+2/-2) tests/qmltests/Panel/tst_Panel.qml (+14/-12) |
To merge this branch: | bzr merge lp:~nick-dedekind/unity8/lp1264678-indicator.misalignment |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Albert Astals Cid (community) | Approve | ||
Review via email: mp+200866@code.launchpad.net |
Commit message
Fixes visible indicator misalignment in indicator items/menus (lp#1264678)
Description of the change
Fixes visible indicator misalignment in indicator items/menus (lp#1264678)
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:619
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Nick Dedekind (nick-dedekind) wrote : | # |
Most of this is to resolve some binding loops.
Fix is:
116 + onDataChanged: tabs.selectedTa
117 + onRowsInserted: tabs.selectedTa
118 + onRowsRemoved: tabs.selectedTa
Albert Astals Cid (aacid) wrote : | # |
As discussed in IRC Nick is
<dednick> but i think IndicatorRow should probably be doing the updating and notifying the MenuContent.
<dednick> investigating it :) i'll try work on a unit test as well
Albert Astals Cid (aacid) wrote : | # |
Putting a "Needs Fixing" just to mark this is waiting some work from Nick
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:622
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
If i unlock and then press with the mouse over the Messaging icon and don't move at all i get http://
Can you reproduce? Is this something we can fix?
Albert Astals Cid (aacid) wrote : | # |
I actually meant "Is this something we can test?" instead of "Is this something we can fix?" :D
Nick Dedekind (nick-dedekind) wrote : | # |
> If i unlock and then press with the mouse over the Messaging icon and don't
> move at all i get http://
>
> Can you reproduce? Is this something we can fix?
This is a bug in the SDK
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:622
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Needs remerging
Text conflict in tests/qmltests/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:624
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Looks good to me
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'qml/Panel/IndicatorRow.qml' |
2 | --- qml/Panel/IndicatorRow.qml 2014-01-10 13:48:13 +0000 |
3 | +++ qml/Panel/IndicatorRow.qml 2014-01-15 11:27:34 +0000 |
4 | @@ -26,7 +26,7 @@ |
5 | readonly property int currentItemIndex: currentItem ? currentItem.ownIndex : -1 |
6 | property alias row: row |
7 | property QtObject indicatorsModel: null |
8 | - property var visibleIndicators: defined |
9 | + property var visibleIndicators: undefined |
10 | property int overFlowWidth: width |
11 | property bool showAll: false |
12 | property real currentItemOffset: 0.0 |
13 | @@ -94,34 +94,56 @@ |
14 | property real opacityMultiplier: highlighted ? 1 : (1 - indicatorRow.unitProgress) |
15 | |
16 | IndicatorItem { |
17 | - id: indicatorItem |
18 | - identifier: model.identifier |
19 | - height: parent.height |
20 | - |
21 | - dimmed: itemWrapper.dimmed |
22 | - |
23 | - widgetSource: model.widgetSource |
24 | - indicatorProperties : model.indicatorProperties |
25 | - |
26 | - Component.onCompleted: { |
27 | - if (visibleIndicators == undefined) { |
28 | - visibleIndicators = {} |
29 | - } |
30 | - indicatorRow.visibleIndicators[model.identifier] = indicatorVisible; |
31 | - indicatorRow.visibleIndicatorsChanged(); |
32 | - } |
33 | - onIndicatorVisibleChanged: { |
34 | - if (visibleIndicators == undefined) { |
35 | - visibleIndicators = {} |
36 | - } |
37 | - indicatorRow.visibleIndicators[model.identifier] = indicatorVisible; |
38 | - indicatorRow.visibleIndicatorsChanged(); |
39 | - |
40 | - if (indicatorVisible) { |
41 | - showAll = true; |
42 | - allVisible.start(); |
43 | - } |
44 | - } |
45 | + id: indicatorItem |
46 | + identifier: model.identifier |
47 | + height: parent.height |
48 | + |
49 | + dimmed: itemWrapper.dimmed |
50 | + |
51 | + widgetSource: model.widgetSource |
52 | + indicatorProperties : model.indicatorProperties |
53 | + |
54 | + Component.onCompleted: { |
55 | + updateVisiblility(); |
56 | + } |
57 | + onIndicatorVisibleChanged: { |
58 | + updateVisiblility(); |
59 | + |
60 | + if (indicatorVisible) { |
61 | + showAll = true; |
62 | + allVisible.start(); |
63 | + } |
64 | + } |
65 | + |
66 | + function updateVisiblility() { |
67 | + if (visibleIndicators == undefined) { |
68 | + visibleIndicators = {} |
69 | + } |
70 | + indicatorRow.visibleIndicators[model.identifier] = indicatorVisible; |
71 | + |
72 | + // removed current index? |
73 | + if (indicatorRow.currentItemIndex === index && !indicatorVisible) { |
74 | + // find the next closest visible indicator (after current, else before) |
75 | + var newIndex = -1; |
76 | + for (var i = index+1; i < rowRepeater.count; i++) { |
77 | + if (indicatorRow.visibleIndicators[i] === undefined || indicatorRow.visibleIndicators[model.identifier]) { |
78 | + newIndex = i; |
79 | + break; |
80 | + } |
81 | + } |
82 | + if (newIndex === -1) { |
83 | + for (i = index - 1; i >= 0; i--) { |
84 | + if (indicatorRow.visibleIndicators[i] === undefined || indicatorRow.visibleIndicators[model.identifier]) { |
85 | + newIndex = i; |
86 | + break; |
87 | + } |
88 | + } |
89 | + } |
90 | + indicatorRow.setCurrentItem(newIndex); |
91 | + } |
92 | + |
93 | + indicatorRow.visibleIndicatorsChanged(); |
94 | + } |
95 | } |
96 | |
97 | states: [ |
98 | |
99 | === modified file 'qml/Panel/Indicators.qml' |
100 | --- qml/Panel/Indicators.qml 2014-01-06 10:26:03 +0000 |
101 | +++ qml/Panel/Indicators.qml 2014-01-15 11:27:34 +0000 |
102 | @@ -193,21 +193,6 @@ |
103 | clip: !indicators.fullyOpened |
104 | activeHeader: indicators.state == "hint" || indicators.state == "reveal" |
105 | enabled: contentEnabled |
106 | - visibleIndicators: indicatorRow.visibleIndicators |
107 | - |
108 | - Connections { |
109 | - property bool enableIndexChangeSignal: true |
110 | - |
111 | - target: enableIndexChangeSignal ? indicatorRow : null |
112 | - onCurrentItemIndexChanged: { |
113 | - var oldActive = enableIndexChangeSignal; |
114 | - enableIndexChangeSignal = false; |
115 | - |
116 | - menuContent.setCurrentMenuIndex(indicatorRow.currentItemIndex); |
117 | - |
118 | - enableIndexChangeSignal = oldActive; |
119 | - } |
120 | - } |
121 | |
122 | //small shadow gradient at bottom of menu |
123 | Rectangle { |
124 | @@ -263,8 +248,6 @@ |
125 | |
126 | Indicators.IndicatorsModel { |
127 | id: indicatorsModel |
128 | - |
129 | - Component.onCompleted: load() |
130 | } |
131 | |
132 | IndicatorRow { |
133 | @@ -279,17 +262,11 @@ |
134 | state: indicators.state |
135 | unitProgress: indicators.unitProgress |
136 | |
137 | - Connections { |
138 | - property bool enableIndexChangeSignal: true |
139 | - |
140 | - target: enableIndexChangeSignal ? menuContent : null |
141 | - onCurrentMenuIndexChanged: { |
142 | - var oldActive = enableIndexChangeSignal; |
143 | - enableIndexChangeSignal = false; |
144 | - |
145 | - indicatorRow.setCurrentItem(menuContent.currentMenuIndex); |
146 | - |
147 | - enableIndexChangeSignal = oldActive; |
148 | + onVisibleIndicatorsChanged: { |
149 | + // need to do it here so we can control sequence |
150 | + if (visibleIndicators !== undefined) { |
151 | + menuContent.visibleIndicators = visibleIndicators; |
152 | + menuContent.setCurrentMenuIndex(currentItemIndex); |
153 | } |
154 | } |
155 | |
156 | @@ -341,15 +318,45 @@ |
157 | } |
158 | } |
159 | |
160 | - property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null |
161 | + QtObject { |
162 | + id: d |
163 | + property bool enableIndexChangeSignal: true |
164 | + property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null |
165 | + } |
166 | + |
167 | + Connections { |
168 | + target: menuContent |
169 | + onCurrentMenuIndexChanged: { |
170 | + var oldActive = d.enableIndexChangeSignal; |
171 | + if (!oldActive) return; |
172 | + d.enableIndexChangeSignal = false; |
173 | + |
174 | + indicatorRow.setCurrentItem(menuContent.currentMenuIndex); |
175 | + |
176 | + d.enableIndexChangeSignal = oldActive; |
177 | + } |
178 | + } |
179 | + |
180 | + Connections { |
181 | + target: indicatorRow |
182 | + onCurrentItemIndexChanged: { |
183 | + var oldActive = d.enableIndexChangeSignal; |
184 | + if (!oldActive) return; |
185 | + d.enableIndexChangeSignal = false; |
186 | + |
187 | + menuContent.setCurrentMenuIndex(indicatorRow.currentItemIndex); |
188 | + |
189 | + d.enableIndexChangeSignal = oldActive; |
190 | + } |
191 | + } |
192 | // connections to the active drag handle |
193 | Connections { |
194 | - target: activeDragHandle |
195 | + target: d.activeDragHandle |
196 | onTouchXChanged: { |
197 | - indicators.calculateCurrentItem(activeDragHandle.touchX, true); |
198 | + indicators.calculateCurrentItem(d.activeDragHandle.touchX, true); |
199 | } |
200 | onTouchSceneYChanged: { |
201 | - yVelocityCalculator.trackedPosition = activeDragHandle.touchSceneY; |
202 | + yVelocityCalculator.trackedPosition = d.activeDragHandle.touchSceneY; |
203 | } |
204 | } |
205 | |
206 | @@ -403,8 +410,8 @@ |
207 | } |
208 | StateChangeScript { |
209 | script: { |
210 | - if (activeDragHandle) { |
211 | - calculateCurrentItem(activeDragHandle.touchX, false); |
212 | + if (d.activeDragHandle) { |
213 | + calculateCurrentItem(d.activeDragHandle.touchX, false); |
214 | } |
215 | } |
216 | } |
217 | @@ -429,4 +436,9 @@ |
218 | NumberAnimation {targets: [indicatorRow, menuContent]; property: "y"; duration: 300; easing.type: Easing.OutCubic} |
219 | } |
220 | ] |
221 | + |
222 | + Component.onCompleted: initialise(); |
223 | + function initialise() { |
224 | + indicatorsModel.load(); |
225 | + } |
226 | } |
227 | |
228 | === modified file 'qml/Panel/MenuContent.qml' |
229 | --- qml/Panel/MenuContent.qml 2014-01-06 10:26:03 +0000 |
230 | +++ qml/Panel/MenuContent.qml 2014-01-15 11:27:34 +0000 |
231 | @@ -39,10 +39,10 @@ |
232 | height: units.gu(42) |
233 | |
234 | function setCurrentMenuIndex(index) { |
235 | - var filteredIndex = filteredIndicators.mapFromSource(index) |
236 | + var filteredIndex = filteredIndicators.mapFromSource(index); |
237 | |
238 | if (tabs.selectedTabIndex !== filteredIndex) { |
239 | - if (tabs.selectedTabIndex == -1 || !animateNextMenuChange) { |
240 | + if (tabs.selectedTabIndex === -1 || !animateNextMenuChange) { |
241 | tabs.tabBar.animate = false; |
242 | } |
243 | tabs.selectedTabIndex = filteredIndex; |
244 | |
245 | === modified file 'tests/mocks/Unity/Indicators/IndicatorsModel.qml' |
246 | --- tests/mocks/Unity/Indicators/IndicatorsModel.qml 2013-09-17 12:31:19 +0000 |
247 | +++ tests/mocks/Unity/Indicators/IndicatorsModel.qml 2014-01-15 11:27:34 +0000 |
248 | @@ -21,12 +21,9 @@ |
249 | |
250 | property var indicatorData : undefined |
251 | |
252 | - function load() {} |
253 | + function load() { |
254 | + clear(); |
255 | |
256 | - // Need to do this dynamically. |
257 | - // Apparently ListModels dont order roles visually when using ListElement |
258 | - // which throws off the filter for non-visible indicators. |
259 | - Component.onCompleted: { |
260 | append({ "identifier": "indicator-fake1", |
261 | "position": 0, |
262 | "widgetSource": "qrc:/tests/indciators/qml/fake_menu_widget1.qml", |
263 | |
264 | === modified file 'tests/mocks/Unity/Indicators/qml/fake_menu_widget2.qml' |
265 | --- tests/mocks/Unity/Indicators/qml/fake_menu_widget2.qml 2013-08-22 18:37:09 +0000 |
266 | +++ tests/mocks/Unity/Indicators/qml/fake_menu_widget2.qml 2014-01-15 11:27:34 +0000 |
267 | @@ -19,7 +19,5 @@ |
268 | Rectangle { |
269 | width: 40 |
270 | height: 40 |
271 | - color : "yellow" |
272 | - |
273 | - enabled: false |
274 | + color : "blue" |
275 | } |
276 | |
277 | === modified file 'tests/mocks/Unity/Indicators/qml/fake_menu_widget3.qml' |
278 | --- tests/mocks/Unity/Indicators/qml/fake_menu_widget3.qml 2013-06-17 09:02:14 +0000 |
279 | +++ tests/mocks/Unity/Indicators/qml/fake_menu_widget3.qml 2014-01-15 11:27:34 +0000 |
280 | @@ -19,5 +19,5 @@ |
281 | Rectangle { |
282 | width: 40 |
283 | height: 40 |
284 | - color : "blue" |
285 | + color : "yellow" |
286 | } |
287 | |
288 | === modified file 'tests/qmltests/Panel/tst_IndicatorRow.qml' |
289 | --- tests/qmltests/Panel/tst_IndicatorRow.qml 2014-01-07 14:29:23 +0000 |
290 | +++ tests/qmltests/Panel/tst_IndicatorRow.qml 2014-01-15 11:27:34 +0000 |
291 | @@ -32,6 +32,8 @@ |
292 | |
293 | function init_test() |
294 | { |
295 | + indicatorModel.load(); |
296 | + |
297 | indicatorRow.state = "initial"; |
298 | indicatorRow.currentItem = null; |
299 | indicatorRow.unitProgress = 0.0; |
300 | @@ -53,7 +55,6 @@ |
301 | |
302 | Indicators.IndicatorsModel { |
303 | id: indicatorModel |
304 | - Component.onCompleted: load() |
305 | } |
306 | |
307 | UT.UnityTestCase { |
308 | |
309 | === modified file 'tests/qmltests/Panel/tst_Indicators.qml' |
310 | --- tests/qmltests/Panel/tst_Indicators.qml 2014-01-15 08:36:33 +0000 |
311 | +++ tests/qmltests/Panel/tst_Indicators.qml 2014-01-15 11:27:34 +0000 |
312 | @@ -83,6 +83,8 @@ |
313 | when: windowShown |
314 | |
315 | function init() { |
316 | + indicators.initialise(); |
317 | + |
318 | indicators.hide(); |
319 | tryCompare(indicators.hideAnimation, "running", false); |
320 | tryCompare(indicators, "state", "initial"); |
321 | @@ -161,21 +163,70 @@ |
322 | compare(indicators.fullyOpened, true); |
323 | } |
324 | |
325 | + function init_invisible_indicator(identifier) { |
326 | + tryCompareFunction(function() { return findChild(indicators, identifier+"-widget") !== null }, true); |
327 | + var item = findChild(indicators, identifier+"-widget"); |
328 | + |
329 | + item.enabled = false; |
330 | + } |
331 | + |
332 | function test_row_visible_menuContent_visible_data() { return [ |
333 | - {tag: "visible", index: 0, name: "indicator-fake1", visible: true }, |
334 | - {tag: "invisible", index: 1, name: "indicator-fake2", visible: false }] |
335 | + {tag: "first", visible: [false, true, true, true, true] }, |
336 | + {tag: "adjacent", visible: [true, false, false, true, true] }, |
337 | + {tag: "bounds", visible: [false, true, true, true, false] }, |
338 | + {tag: "disjoint", visible: [true, false, true, false, true] }, |
339 | + {tag: "last", visible: [true, true, true, true, false] }]; |
340 | } |
341 | |
342 | function test_row_visible_menuContent_visible(data) { |
343 | - var indicatorTabs = findChild(indicators, "tabs"); |
344 | - var rowRepeater = findChild(indicators, "rowRepeater"); |
345 | - |
346 | - var indicatorItem = rowRepeater.itemAt(data.index); |
347 | - tryCompareFunction(function() { return indicatorItem.width > 0}, true); |
348 | - tryCompare(indicatorItem, "visible", data.visible); |
349 | - |
350 | - var indicatorTab = findChild(indicatorTabs, data.name) |
351 | - tryCompareFunction(function() { return indicatorTab !== null }, data.visible); |
352 | + |
353 | + indicators.show(); |
354 | + |
355 | + var indicatorTabs = findChild(indicators, "tabs"); |
356 | + var rowRepeater = findChild(indicators, "rowRepeater") |
357 | + |
358 | + |
359 | + for (var i = 0; i< data.visible.length; i++) { |
360 | + if (data.visible[i] === false) |
361 | + init_invisible_indicator("indicator-fake" + (i + 1)); |
362 | + } |
363 | + |
364 | + for (i = 0; i < data.visible.length; i++) { |
365 | + var shouldBeVisible = data.visible[i]; |
366 | + |
367 | + // check item visibility |
368 | + var indicatorItem = rowRepeater.itemAt(i); |
369 | + tryCompare(indicatorItem, "visible", shouldBeVisible); |
370 | + // check tab visibility |
371 | + tryCompareFunction(function() { return findChild(indicatorTabs, "indicator-fake" + (i + 1)) !== null }, shouldBeVisible); |
372 | + } |
373 | + } |
374 | + |
375 | + function test_indicator_visible_correct_tabs_data() { return [ |
376 | + {tag: "current-first", currentIndex: 0, visible: [false, true, true, true, true], expected: 1 }, |
377 | + {tag: "current-last", currentIndex: 4, visible: [true, true, true, true, false], expected: 3 }, |
378 | + {tag: "after", currentIndex: 0, visible: [true, false, true, true, true], expected: 0 }, |
379 | + {tag: "before", currentIndex: 1, visible: [false, true, true, true, true], expected: 1 }]; |
380 | + } |
381 | + |
382 | + function test_indicator_visible_correct_tabs(data) { |
383 | + |
384 | + var indicatorTabs = findChild(indicators, "tabs"); |
385 | + var indicatorRow = findChild(indicators, "indicatorRow"); |
386 | + |
387 | + indicators.show(); |
388 | + indicatorRow.setCurrentItem(data.currentIndex); |
389 | + tryCompare(indicators, "fullyOpened", true); |
390 | + |
391 | + for (var i = 0; i< data.visible.length; i++) { |
392 | + if (data.visible[i] === false) |
393 | + init_invisible_indicator("indicator-fake" + (i + 1)); |
394 | + } |
395 | + |
396 | + // check for current selected item |
397 | + tryCompare(indicatorRow, "currentItemIndex", data.expected); |
398 | + // check for current selected tab |
399 | + tryCompareFunction(function() { return findChild(indicatorTabs, "indicator-fake" + (data.expected + 1)) === indicatorTabs.selectedTab }, true); |
400 | } |
401 | } |
402 | } |
403 | |
404 | === modified file 'tests/qmltests/Panel/tst_MenuContent.qml' |
405 | --- tests/qmltests/Panel/tst_MenuContent.qml 2013-12-17 16:04:47 +0000 |
406 | +++ tests/qmltests/Panel/tst_MenuContent.qml 2014-01-15 11:27:34 +0000 |
407 | @@ -103,13 +103,13 @@ |
408 | |
409 | function selected_tab_equals_test_tab() { |
410 | var currentTab = menu_content_test.findChild(menuContent, "tabs").selectedTab |
411 | - if (currentTab == undefined) { |
412 | + if (currentTab === null) { |
413 | console.log("selected tab undefined"); |
414 | return false; |
415 | } |
416 | |
417 | var testTab = menu_content_test.findChild(menuContent, testTabObjectName); |
418 | - if (testTab == undefined) { |
419 | + if (testTab === null) { |
420 | console.log("test_tab " + testTabObjectName + " undefined"); |
421 | return false; |
422 | } |
423 | |
424 | === modified file 'tests/qmltests/Panel/tst_Panel.qml' |
425 | --- tests/qmltests/Panel/tst_Panel.qml 2013-12-17 16:04:47 +0000 |
426 | +++ tests/qmltests/Panel/tst_Panel.qml 2014-01-15 11:27:34 +0000 |
427 | @@ -56,6 +56,8 @@ |
428 | } |
429 | |
430 | function init() { |
431 | + panel.indicators.initialise(); |
432 | + |
433 | searchClicked = false; |
434 | panel.indicators.hide(); |
435 | tryCompare(panel.indicators.hideAnimation, "running", false); |
436 | @@ -64,16 +66,16 @@ |
437 | |
438 | function get_indicator_item(index) { |
439 | var rowRepeater = findChild(panel.indicators, "rowRepeater"); |
440 | - verify(rowRepeater != undefined); |
441 | + verify(rowRepeater !== null); |
442 | return rowRepeater.itemAt(index); |
443 | } |
444 | |
445 | function get_indicator_item_position(index) { |
446 | var indicatorRow = findChild(panel.indicators, "indicatorRow"); |
447 | - verify(indicatorRow != undefined); |
448 | + verify(indicatorRow !== null); |
449 | |
450 | var indicatorItem = get_indicator_item(index); |
451 | - verify(indicatorItem != undefined); |
452 | + verify(indicatorItem !== null); |
453 | |
454 | return panel.mapFromItem(indicatorItem, indicatorItem.width/2, indicatorItem.height/2); |
455 | } |
456 | @@ -118,7 +120,7 @@ |
457 | // no hint animation when fullscreen |
458 | compare(panel.indicators.y, -panel.panelHeight); |
459 | var indicatorRow = findChild(panel.indicators, "indicatorRow"); |
460 | - verify(indicatorRow != undefined); |
461 | + verify(indicatorRow !== null); |
462 | compare(indicatorRow.y, 0); |
463 | compare(panel.indicators.height, panel.indicators.panelHeight); |
464 | compare(panel.indicators.partiallyOpened, false, |
465 | @@ -143,13 +145,13 @@ |
466 | } |
467 | |
468 | var indicatorRow = findChild(panel.indicators, "indicatorRow"); |
469 | - verify(indicatorRow != undefined); |
470 | + verify(indicatorRow !== null); |
471 | |
472 | var rowRepeater = findChild(panel.indicators, "rowRepeater"); |
473 | - verify(indicatorRow != undefined); |
474 | + verify(indicatorRow !== null); |
475 | |
476 | var menuContent = findChild(panel.indicators, "menuContent"); |
477 | - verify(indicatorRow != undefined); |
478 | + verify(indicatorRow !== null); |
479 | |
480 | // Wait for the indicators to get into position. |
481 | // (switches between normal and fullscreen modes are animated) |
482 | @@ -203,7 +205,7 @@ |
483 | panel.searchVisible = true; |
484 | |
485 | var searchIndicator = findChild(panel, "search"); |
486 | - verify(searchIndicator != undefined); |
487 | + verify(searchIndicator !== null); |
488 | |
489 | tap(searchIndicator, 1, 1); |
490 | |
491 | @@ -216,7 +218,7 @@ |
492 | panel.searchVisible = false; |
493 | |
494 | var searchIndicator = findChild(panel, "search"); |
495 | - verify(searchIndicator != undefined); |
496 | + verify(searchIndicator !== null); |
497 | |
498 | tap(searchIndicator, 1, 1); |
499 | |
500 | @@ -232,14 +234,14 @@ |
501 | panel.searchVisible = false; |
502 | |
503 | var indicatorRow = findChild(panel.indicators, "indicatorRow"); |
504 | - verify(indicatorRow != undefined); |
505 | + verify(indicatorRow !== null); |
506 | |
507 | var rowRepeater = findChild(panel.indicators, "rowRepeater"); |
508 | - verify(indicatorRow != undefined); |
509 | + verify(indicatorRow !== null); |
510 | |
511 | // Get the first indicator |
512 | var indicatorItemFirst = get_indicator_item(0); |
513 | - verify(indicatorItemFirst != undefined); |
514 | + verify(indicatorItemFirst !== undefined); |
515 | |
516 | var indicatorItemCoordFirst = get_indicator_item_position(0); |
517 | var indicatorItemCoordNext = get_indicator_item_position(indicatorRow.count - 1); |
FAILED: Continuous integration, rev:619 jenkins. qa.ubuntu. com/job/ unity8- ci/2010/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty/ 2115/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty- touch/2014 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- trusty/ 841 jenkins. qa.ubuntu. com/job/ unity8- trusty- amd64-ci/ 532 jenkins. qa.ubuntu. com/job/ unity8- trusty- armhf-ci/ 534 jenkins. qa.ubuntu. com/job/ unity8- trusty- armhf-ci/ 534/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- trusty- i386-ci/ 532 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/2115/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/2014 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/2014/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- mako/4485 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 2851
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/2010/ rebuild
http://