Merge lp:~gerboland/unity/lvwph-tests into lp:unity/phablet
- lvwph-tests
- Merge into phablet
Status: | Merged |
---|---|
Approved by: | Michael Zanetti |
Approved revision: | no longer in the source branch. |
Merged at revision: | 592 |
Proposed branch: | lp:~gerboland/unity/lvwph-tests |
Merge into: | lp:unity/phablet |
Diff against target: |
396 lines (+357/-2) 4 files modified
Components/ListViewWithPageHeader.qml (+4/-0) tests/qmluitests/Components/CMakeLists.txt (+1/-0) tests/qmluitests/Components/tst_ListViewWithPageHeader.qml (+350/-0) tests/qmluitests/UnityTestCase.qml (+2/-2) |
To merge this branch: | bzr merge lp:~gerboland/unity/lvwph-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Michael Zanetti (community) | Approve | ||
Review via email: mp+158336@code.launchpad.net |
Commit message
[tests] Add ListViewWithPag
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:555
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:556
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:557
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
MichaĆ Sawicz (saviq) wrote : | # |
The above failure should go away with lp:~saviq/unity/phablet.add-python3-dep
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:557
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:557
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Zanetti (mzanetti) wrote : | # |
looks good to me. Jenkins seems happy too
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Michael Zanetti (mzanetti) : | # |
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'Components/ListViewWithPageHeader.qml' | |||
2 | --- Components/ListViewWithPageHeader.qml 2013-02-27 17:36:32 +0000 | |||
3 | +++ Components/ListViewWithPageHeader.qml 2013-04-12 15:11:26 +0000 | |||
4 | @@ -64,6 +64,10 @@ | |||
5 | 64 | headerAnimation.start() | 64 | headerAnimation.start() |
6 | 65 | } | 65 | } |
7 | 66 | 66 | ||
8 | 67 | function flick(xVelocity, yVelocity) { | ||
9 | 68 | flicker.flick(xVelocity, yVelocity); | ||
10 | 69 | } | ||
11 | 70 | |||
12 | 67 | onPageHeaderChanged: { | 71 | onPageHeaderChanged: { |
13 | 68 | pageHeader.parent = pageHeaderContainer; | 72 | pageHeader.parent = pageHeaderContainer; |
14 | 69 | pageHeader.anchors.fill = pageHeaderContainer; | 73 | pageHeader.anchors.fill = pageHeaderContainer; |
15 | 70 | 74 | ||
16 | === modified file 'tests/qmluitests/Components/CMakeLists.txt' | |||
17 | --- tests/qmluitests/Components/CMakeLists.txt 2013-04-12 12:49:20 +0000 | |||
18 | +++ tests/qmluitests/Components/CMakeLists.txt 2013-04-12 15:11:26 +0000 | |||
19 | @@ -1,5 +1,6 @@ | |||
20 | 1 | add_qml_test(DraggingArea) | 1 | add_qml_test(DraggingArea) |
21 | 2 | add_qml_test(FilterGrid IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins) | 2 | add_qml_test(FilterGrid IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins) |
22 | 3 | add_qml_test(ListViewWithPageHeader) | ||
23 | 3 | add_qml_test(ResponsiveFlowView) | 4 | add_qml_test(ResponsiveFlowView) |
24 | 4 | add_qml_test(ResponsiveGridView) | 5 | add_qml_test(ResponsiveGridView) |
25 | 5 | add_qml_test(Revealer) | 6 | add_qml_test(Revealer) |
26 | 6 | 7 | ||
27 | === added file 'tests/qmluitests/Components/tst_ListViewWithPageHeader.qml' | |||
28 | --- tests/qmluitests/Components/tst_ListViewWithPageHeader.qml 1970-01-01 00:00:00 +0000 | |||
29 | +++ tests/qmluitests/Components/tst_ListViewWithPageHeader.qml 2013-04-12 15:11:26 +0000 | |||
30 | @@ -0,0 +1,350 @@ | |||
31 | 1 | ï»ż/* | ||
32 | 2 | * Copyright 2013 Canonical Ltd. | ||
33 | 3 | * | ||
34 | 4 | * This program is free software; you can redistribute it and/or modify | ||
35 | 5 | * it under the terms of the GNU General Public License as published by | ||
36 | 6 | * the Free Software Foundation; version 3. | ||
37 | 7 | * | ||
38 | 8 | * This program is distributed in the hope that it will be useful, | ||
39 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
40 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
41 | 11 | * GNU General Public License for more details. | ||
42 | 12 | * | ||
43 | 13 | * You should have received a copy of the GNU General Public License | ||
44 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
45 | 15 | */ | ||
46 | 16 | |||
47 | 17 | import QtQuick 2.0 | ||
48 | 18 | import QtTest 1.0 | ||
49 | 19 | import ".." | ||
50 | 20 | import "../../../Components" | ||
51 | 21 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
52 | 22 | import Ubuntu.Components 0.1 | ||
53 | 23 | |||
54 | 24 | Item { | ||
55 | 25 | id: root | ||
56 | 26 | width: units.gu(40) | ||
57 | 27 | height: units.gu(80) | ||
58 | 28 | |||
59 | 29 | ListModel { | ||
60 | 30 | id: animalsModel | ||
61 | 31 | ListElement { name: "Parrot"; size: "Small" } | ||
62 | 32 | ListElement { name: "Guinea pig"; size: "Small" } | ||
63 | 33 | ListElement { name: "Mouse"; size: "Small" } | ||
64 | 34 | ListElement { name: "Sparrow"; size: "Small" } | ||
65 | 35 | ListElement { name: "Dog"; size: "Medium" } | ||
66 | 36 | ListElement { name: "Cat"; size: "Medium" } | ||
67 | 37 | ListElement { name: "Dolphin"; size: "Medium" } | ||
68 | 38 | ListElement { name: "Seal"; size: "Medium" } | ||
69 | 39 | ListElement { name: "Elephant"; size: "Large" } | ||
70 | 40 | ListElement { name: "Blue whale"; size: "Large" } | ||
71 | 41 | ListElement { name: "Rhino"; size: "Large" } | ||
72 | 42 | ListElement { name: "Ostrich"; size: "Large" } | ||
73 | 43 | ListElement { name: "Sperm whale"; size: "Large" } | ||
74 | 44 | ListElement { name: "Giraffe"; size: "Large" } | ||
75 | 45 | ListElement { name: "Parrot"; size: "Small" } | ||
76 | 46 | ListElement { name: "Guinea pig"; size: "Small" } | ||
77 | 47 | ListElement { name: "Mouse"; size: "Small" } | ||
78 | 48 | ListElement { name: "Sparrow"; size: "Small" } | ||
79 | 49 | ListElement { name: "Dog"; size: "Medium" } | ||
80 | 50 | ListElement { name: "Cat"; size: "Medium" } | ||
81 | 51 | ListElement { name: "Dolphin"; size: "Medium" } | ||
82 | 52 | ListElement { name: "Seal"; size: "Medium" } | ||
83 | 53 | ListElement { name: "Elephant"; size: "Large" } | ||
84 | 54 | ListElement { name: "Blue whale"; size: "Large" } | ||
85 | 55 | ListElement { name: "Rhino"; size: "Large" } | ||
86 | 56 | ListElement { name: "Ostrich"; size: "Large" } | ||
87 | 57 | ListElement { name: "Sperm whale"; size: "Large" } | ||
88 | 58 | ListElement { name: "Giraffe"; size: "Large" } | ||
89 | 59 | ListElement { name: "Parrot"; size: "Small" } | ||
90 | 60 | ListElement { name: "Guinea pig"; size: "Small" } | ||
91 | 61 | ListElement { name: "Mouse"; size: "Small" } | ||
92 | 62 | ListElement { name: "Sparrow"; size: "Small" } | ||
93 | 63 | ListElement { name: "Dog"; size: "Medium" } | ||
94 | 64 | ListElement { name: "Cat"; size: "Medium" } | ||
95 | 65 | ListElement { name: "Dolphin"; size: "Medium" } | ||
96 | 66 | ListElement { name: "Seal"; size: "Medium" } | ||
97 | 67 | ListElement { name: "Elephant"; size: "Large" } | ||
98 | 68 | ListElement { name: "Blue whale"; size: "Large" } | ||
99 | 69 | ListElement { name: "Rhino"; size: "Large" } | ||
100 | 70 | ListElement { name: "Ostrich"; size: "Large" } | ||
101 | 71 | ListElement { name: "Sperm whale"; size: "Large" } | ||
102 | 72 | ListElement { name: "Giraffe"; size: "Large" } | ||
103 | 73 | ListElement { name: "Parrot"; size: "Small" } | ||
104 | 74 | ListElement { name: "Guinea pig"; size: "Small" } | ||
105 | 75 | ListElement { name: "Mouse"; size: "Small" } | ||
106 | 76 | ListElement { name: "Sparrow"; size: "Small" } | ||
107 | 77 | ListElement { name: "Dog"; size: "Medium" } | ||
108 | 78 | ListElement { name: "Cat"; size: "Medium" } | ||
109 | 79 | ListElement { name: "Dolphin"; size: "Medium" } | ||
110 | 80 | ListElement { name: "Seal"; size: "Medium" } | ||
111 | 81 | ListElement { name: "Elephant"; size: "Large" } | ||
112 | 82 | ListElement { name: "Blue whale"; size: "Large" } | ||
113 | 83 | ListElement { name: "Rhino"; size: "Large" } | ||
114 | 84 | ListElement { name: "Ostrich"; size: "Large" } | ||
115 | 85 | ListElement { name: "Sperm whale"; size: "Large" } | ||
116 | 86 | ListElement { name: "Giraffe"; size: "Large" } | ||
117 | 87 | } | ||
118 | 88 | |||
119 | 89 | ListViewWithPageHeader { | ||
120 | 90 | id: listView | ||
121 | 91 | anchors.fill: parent | ||
122 | 92 | model: animalsModel | ||
123 | 93 | |||
124 | 94 | delegate: Item { | ||
125 | 95 | height: units.gu(6) | ||
126 | 96 | anchors { | ||
127 | 97 | left: parent.left | ||
128 | 98 | right: parent.right | ||
129 | 99 | } | ||
130 | 100 | |||
131 | 101 | Label { | ||
132 | 102 | id: label | ||
133 | 103 | anchors.fill: parent | ||
134 | 104 | text: name | ||
135 | 105 | verticalAlignment: Text.AlignVCenter | ||
136 | 106 | } | ||
137 | 107 | } | ||
138 | 108 | |||
139 | 109 | sectionProperty: "size" | ||
140 | 110 | sectionDelegate: Rectangle { | ||
141 | 111 | anchors { | ||
142 | 112 | left: (parent) ? parent.left : undefined | ||
143 | 113 | right: (parent) ? parent.right : undefined | ||
144 | 114 | } | ||
145 | 115 | height: units.gu(5) | ||
146 | 116 | color: "lightsteelblue" | ||
147 | 117 | |||
148 | 118 | Label { | ||
149 | 119 | id: label | ||
150 | 120 | anchors.fill: parent | ||
151 | 121 | text: section | ||
152 | 122 | verticalAlignment: Text.AlignVCenter | ||
153 | 123 | } | ||
154 | 124 | } | ||
155 | 125 | |||
156 | 126 | pageHeader: PageHeader { | ||
157 | 127 | id: pageHeader | ||
158 | 128 | anchors { | ||
159 | 129 | left: parent.left | ||
160 | 130 | right: parent.right | ||
161 | 131 | } | ||
162 | 132 | text: "Animals" | ||
163 | 133 | } | ||
164 | 134 | } | ||
165 | 135 | |||
166 | 136 | |||
167 | 137 | |||
168 | 138 | |||
169 | 139 | UnityTestCase { | ||
170 | 140 | name: "ListViewWithPageHeader" | ||
171 | 141 | when: windowShown | ||
172 | 142 | |||
173 | 143 | readonly property real xPos: listView.width / 2 | ||
174 | 144 | readonly property real headerHeight: pageHeader.height | ||
175 | 145 | |||
176 | 146 | /**************************** Helper functions ****************************/ | ||
177 | 147 | function listViewFirstSectionHeaderYPosition() { | ||
178 | 148 | return Math.round(listView.pageHeader.mapToItem(listView).y); //round as using floats | ||
179 | 149 | } | ||
180 | 150 | |||
181 | 151 | function firstSectionHeaderYPosition() { | ||
182 | 152 | return Math.round(listView.view.children[0].mapToItem(listView).y); | ||
183 | 153 | } | ||
184 | 154 | |||
185 | 155 | function cleanup() { | ||
186 | 156 | listView.positionAtBeginning(); | ||
187 | 157 | // wait for list position to reset | ||
188 | 158 | tryCompareFunction(listViewFirstSectionHeaderYPosition, 0); | ||
189 | 159 | tryCompare(listView.view.contentY, 0); | ||
190 | 160 | } | ||
191 | 161 | |||
192 | 162 | // these functions are hand-crafted to move the Flickable down/up one pixel | ||
193 | 163 | function swipeDown1Pixel(item) { | ||
194 | 164 | mousePress(item, xPos, 15); | ||
195 | 165 | mouseMove(item, xPos, 14, 100); | ||
196 | 166 | mouseMove(item, xPos, 10, 100); | ||
197 | 167 | mouseMove(item, xPos, 6, 100); | ||
198 | 168 | mouseMove(item, xPos, 3, 100); | ||
199 | 169 | mouseMove(item, xPos, 1, 100); | ||
200 | 170 | mouseMove(item, xPos, 0, 100); | ||
201 | 171 | mouseRelease(item, xPos, 0); | ||
202 | 172 | } | ||
203 | 173 | |||
204 | 174 | function swipeUp1Pixel(item) { | ||
205 | 175 | mousePress(item, xPos, 0); | ||
206 | 176 | mouseMove(item, xPos, 1, 100); | ||
207 | 177 | mouseMove(item, xPos, 5, 100); | ||
208 | 178 | mouseMove(item, xPos, 9, 100); | ||
209 | 179 | mouseMove(item, xPos, 12, 100); | ||
210 | 180 | mouseMove(item, xPos, 14, 100); | ||
211 | 181 | mouseMove(item, xPos, 15, 100); | ||
212 | 182 | mouseRelease(item, xPos, 15); | ||
213 | 183 | } | ||
214 | 184 | |||
215 | 185 | /******************************* Test cases *******************************/ | ||
216 | 186 | |||
217 | 187 | /* Check the initial positions of components are correct */ | ||
218 | 188 | function test_initialState() { | ||
219 | 189 | compare(listViewFirstSectionHeaderYPosition(), 0); | ||
220 | 190 | compare(listView.view.contentY, 0); | ||
221 | 191 | |||
222 | 192 | // Check that the section delegate is positioned underneath the header | ||
223 | 193 | // First section delegate is the first child of the view | ||
224 | 194 | tryCompareFunction(firstSectionHeaderYPosition, headerHeight); | ||
225 | 195 | } | ||
226 | 196 | |||
227 | 197 | /* Check the header moves up one pixel when the view is moved up by one pixel */ | ||
228 | 198 | function test_headerPositionAfterDownMoveByOnePixel() { | ||
229 | 199 | swipeDown1Pixel(listView) | ||
230 | 200 | |||
231 | 201 | tryCompareFunction(listViewFirstSectionHeaderYPosition, -1); | ||
232 | 202 | tryCompareFunction(firstSectionHeaderYPosition, headerHeight - 1); | ||
233 | 203 | tryCompare(listView.view.contentY, -1); | ||
234 | 204 | } | ||
235 | 205 | |||
236 | 206 | /* Check the header position is y=0 when view moved up and then down by one pixel */ | ||
237 | 207 | function test_headerPositionAfterDownAndThenUpMoveByOne() { | ||
238 | 208 | swipeDown1Pixel(listView) | ||
239 | 209 | |||
240 | 210 | tryCompareFunction(listViewFirstSectionHeaderYPosition, -1); | ||
241 | 211 | tryCompare(listView.view.contentY, -1); | ||
242 | 212 | |||
243 | 213 | // these operations move the Flickabe up one pixel | ||
244 | 214 | swipeUp1Pixel(listView); | ||
245 | 215 | |||
246 | 216 | tryCompare(listView.view.contentY, 0); | ||
247 | 217 | // tryCompareFunction(listViewFirstSectionHeaderYPosition, 0) //FIXME - this fails due to bug in LVWPH | ||
248 | 218 | tryCompareFunction(firstSectionHeaderYPosition, headerHeight) | ||
249 | 219 | } | ||
250 | 220 | |||
251 | 221 | /* Check after a big flick the header is moved off-screen, with the header bottom | ||
252 | 222 | placed just above the view */ | ||
253 | 223 | function test_headerPositionAfterDownMove() { | ||
254 | 224 | // move the Flickabe up to hide header | ||
255 | 225 | listView.flick(0, -10000); | ||
256 | 226 | |||
257 | 227 | // wait for flick to finish | ||
258 | 228 | tryCompare(listView.moving, false); | ||
259 | 229 | |||
260 | 230 | tryCompareFunction(listViewFirstSectionHeaderYPosition, -headerHeight); | ||
261 | 231 | } | ||
262 | 232 | |||
263 | 233 | /* Check when header off-screen, moving down the view by one pixel moves the header | ||
264 | 234 | down by one pixel */ | ||
265 | 235 | function test_hiddenHeaderPositionAfterUpMoveByOnePixel() { | ||
266 | 236 | // move the Flickabe up to hide header | ||
267 | 237 | listView.flick(0, -10000); | ||
268 | 238 | |||
269 | 239 | // wait for flick to fully hide header | ||
270 | 240 | tryCompareFunction(listViewFirstSectionHeaderYPosition, -headerHeight); | ||
271 | 241 | |||
272 | 242 | swipeUp1Pixel(listView); | ||
273 | 243 | |||
274 | 244 | tryCompareFunction( function() { | ||
275 | 245 | return Math.floor( listViewFirstSectionHeaderYPosition() ); // need to round to make test more robust | ||
276 | 246 | }, -headerHeight + 1); | ||
277 | 247 | } | ||
278 | 248 | |||
279 | 249 | /* Check if up swipe causes list to bounces at the bottom, header stays hidden */ | ||
280 | 250 | function test_upSwipeCausingBounceKeepsHeaderHidden() { | ||
281 | 251 | // move list to the bottom (will bounce) | ||
282 | 252 | listView.flick(0, -1000000); | ||
283 | 253 | |||
284 | 254 | // wait for bounce to complete | ||
285 | 255 | tryCompare(listView.moving, false); | ||
286 | 256 | tryCompare(listView.view.atYEnd, true); | ||
287 | 257 | |||
288 | 258 | tryCompareFunction(listViewFirstSectionHeaderYPosition, -headerHeight); | ||
289 | 259 | } | ||
290 | 260 | |||
291 | 261 | /* Check if up swipe causes list to bounces at the bottom, header stays hidden */ | ||
292 | 262 | function test_downSwipeCausingBounceKeepsHeaderVisible() { | ||
293 | 263 | // move list to the bottom (will bounce) | ||
294 | 264 | listView.flick(0, -1000000); | ||
295 | 265 | |||
296 | 266 | // wait for bounce to complete | ||
297 | 267 | tryCompare(listView.moving, false); | ||
298 | 268 | tryCompare(listView.view.atYBeginning, true); | ||
299 | 269 | |||
300 | 270 | tryCompareFunction(listViewFirstSectionHeaderYPosition, 0); | ||
301 | 271 | } | ||
302 | 272 | |||
303 | 273 | /* Check if list at top is pulled down further, that the list contents move but the | ||
304 | 274 | header remains at the top of the view */ | ||
305 | 275 | function test_topDragOverBoundsKeepsHeaderVisible() { | ||
306 | 276 | // drag list up - but don't release yet | ||
307 | 277 | mouseFlick(listView, | ||
308 | 278 | xPos, // from_x | ||
309 | 279 | 0, // from_y | ||
310 | 280 | xPos, // to_x | ||
311 | 281 | 100, true, false, 0.2); | ||
312 | 282 | |||
313 | 283 | // wait for gesture to occur | ||
314 | 284 | tryCompareFunction(function() { return listView.view.contentY < 20; }, true); | ||
315 | 285 | tryCompareFunction(listViewFirstSectionHeaderYPosition, 0); | ||
316 | 286 | |||
317 | 287 | mouseRelease(listView, xPos, 400); | ||
318 | 288 | |||
319 | 289 | // ensure list moving to recover from over-bound drag keeps header unchanged | ||
320 | 290 | tryCompare(listView.view.contentY, 0); | ||
321 | 291 | tryCompareFunction(listViewFirstSectionHeaderYPosition, 0); | ||
322 | 292 | } | ||
323 | 293 | |||
324 | 294 | /* Check if list at top is pulled down further, that the list contents move but the | ||
325 | 295 | header remains at the top of the view */ | ||
326 | 296 | function test_bottomDragOverBoundsKeepsHeaderHidden() { | ||
327 | 297 | // move list to the bottom (will bounce) | ||
328 | 298 | listView.flick(0, -1000000); | ||
329 | 299 | |||
330 | 300 | // wait for bounce to complete | ||
331 | 301 | tryCompare(listView.moving, false); | ||
332 | 302 | tryCompare(listView.view.atYEnd, true); | ||
333 | 303 | |||
334 | 304 | // drag list up but don't release | ||
335 | 305 | mouseFlick(listView, | ||
336 | 306 | xPos, // from_x | ||
337 | 307 | 0, // from_y | ||
338 | 308 | xPos, // to_x | ||
339 | 309 | -listView.height, true, false); | ||
340 | 310 | |||
341 | 311 | tryCompareFunction(listViewFirstSectionHeaderYPosition, -headerHeight); | ||
342 | 312 | |||
343 | 313 | mouseRelease(listView, xPos, -listView.height); | ||
344 | 314 | // wait for list to reset position | ||
345 | 315 | tryCompare(listView.moving, false); | ||
346 | 316 | tryCompare(listView.view.atYEnd, true); | ||
347 | 317 | |||
348 | 318 | // ensure list moving to recover from over-bound drag keeps header unchanged | ||
349 | 319 | tryCompareFunction(listViewFirstSectionHeaderYPosition, -headerHeight); | ||
350 | 320 | } | ||
351 | 321 | |||
352 | 322 | /* Check positionAtBeginning() works resets list and header position */ | ||
353 | 323 | function test_positionAtBeginning() { | ||
354 | 324 | // move the Flickabe up to hide header | ||
355 | 325 | listView.flick(0, -10000); | ||
356 | 326 | |||
357 | 327 | // wait for gesture to complete | ||
358 | 328 | tryCompare(listView.moving, false); | ||
359 | 329 | |||
360 | 330 | listView.positionAtBeginning(); | ||
361 | 331 | tryCompareFunction(listViewFirstSectionHeaderYPosition, 0); | ||
362 | 332 | tryCompare(listView.view.contentY, 0); | ||
363 | 333 | } | ||
364 | 334 | |||
365 | 335 | /* Check showHeader forces header to appear but list position remains unchanged */ | ||
366 | 336 | function test_showHeader() { | ||
367 | 337 | // move the Flickabe up to hide header | ||
368 | 338 | listView.flick(0, -10000); | ||
369 | 339 | |||
370 | 340 | // wait for gesture to complete | ||
371 | 341 | tryCompare(listView.moving, false); | ||
372 | 342 | |||
373 | 343 | var listContentY = listView.view.contentY; | ||
374 | 344 | |||
375 | 345 | listView.showHeader(); | ||
376 | 346 | tryCompareFunction(listViewFirstSectionHeaderYPosition, 0); | ||
377 | 347 | tryCompare(listView.view.contentY, listContentY); | ||
378 | 348 | } | ||
379 | 349 | } | ||
380 | 350 | } | ||
381 | 0 | 351 | ||
382 | === modified file 'tests/qmluitests/UnityTestCase.qml' | |||
383 | --- tests/qmluitests/UnityTestCase.qml 2013-04-05 11:03:11 +0000 | |||
384 | +++ tests/qmluitests/UnityTestCase.qml 2013-04-12 15:11:26 +0000 | |||
385 | @@ -54,9 +54,9 @@ | |||
386 | 54 | if (i === nIterations - 1) { | 54 | if (i === nIterations - 1) { |
387 | 55 | // Avoid any rounding errors by making the last move be at precisely | 55 | // Avoid any rounding errors by making the last move be at precisely |
388 | 56 | // the point specified | 56 | // the point specified |
390 | 57 | mouseMove(item, toX, toY) | 57 | mouseMove(item, toX, toY, nIterations / speed) |
391 | 58 | } else { | 58 | } else { |
393 | 59 | mouseMove(item, x + (i + 1) * diffX, y + (i + 1) * diffY) | 59 | mouseMove(item, x + (i + 1) * diffX, y + (i + 1) * diffY, nIterations / speed) |
394 | 60 | } | 60 | } |
395 | 61 | } | 61 | } |
396 | 62 | if (releaseMouse) { | 62 | if (releaseMouse) { |
FAILED: Continuous integration, rev:553 jenkins. qa.ubuntu. com/job/ unity-phablet- ci/444/ s-jenkins: 8080/job/ unity-phablet- qmluitests/ 208 jenkins. qa.ubuntu. com/job/ unity-phablet- quantal- armhf-ci/ 445/console jenkins. qa.ubuntu. com/job/ unity-phablet- quantal- i386-ci/ 444/console jenkins. qa.ubuntu. com/job/ unity-phablet- raring- armhf-ci/ 320/console jenkins. qa.ubuntu. com/job/ unity-phablet- raring- i386-ci/ 324/console
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ unity-phablet- ci/444/ rebuild
http://