Merge lp:~zsombi/ubuntu-ui-toolkit/datepicker-fix1287009 into lp:ubuntu-ui-toolkit
- datepicker-fix1287009
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Cris Dywan |
Approved revision: | 971 |
Merged at revision: | 968 |
Proposed branch: | lp:~zsombi/ubuntu-ui-toolkit/datepicker-fix1287009 |
Merge into: | lp:ubuntu-ui-toolkit |
Diff against target: |
952 lines (+227/-150) 12 files modified
components.api (+3/-0) modules/Ubuntu/Components/Pickers/DatePicker.qml (+16/-0) modules/Ubuntu/Components/Pickers/Picker.qml (+66/-0) modules/Ubuntu/Components/Pickers/PickerDelegate.qml (+1/-1) modules/Ubuntu/Components/Pickers/PickerModelBase.qml (+8/-1) modules/Ubuntu/Components/Pickers/PickerRow.qml (+46/-3) modules/Ubuntu/Components/Pickers/SecondsModel.qml (+2/-2) modules/Ubuntu/Components/Themes/Ambiance/PickerDelegateStyle.qml (+1/-1) modules/Ubuntu/Components/plugin/quickutils.cpp (+3/-0) tests/resources/pickers/DatePickerTest.qml (+5/-0) tests/resources/pickers/PickerTest.qml (+6/-0) tests/unit_x11/tst_components/tst_datepicker.qml (+70/-142) |
To merge this branch: | bzr merge lp:~zsombi/ubuntu-ui-toolkit/datepicker-fix1287009 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cris Dywan | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Timo Jyrinki | Approve | ||
Review via email: mp+209641@code.launchpad.net |
Commit message
DatePicker flaky test fix.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
Timo Jyrinki (timo-jyrinki) wrote : | # |
Fixes the issue in the landing PPA: https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:971
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Cris Dywan (kalikiana) wrote : | # |
I'm liking waitPickerMoving and your use of the loader status. So much cleaner and keeps the tests readable.
Preview Diff
1 | === modified file 'components.api' | |||
2 | --- components.api 2014-03-04 13:01:20 +0000 | |||
3 | +++ components.api 2014-03-06 14:36:38 +0000 | |||
4 | @@ -271,6 +271,7 @@ | |||
5 | 271 | readonly property int minutes | 271 | readonly property int minutes |
6 | 272 | readonly property int seconds | 272 | readonly property int seconds |
7 | 273 | property var locale | 273 | property var locale |
8 | 274 | readonly property bool moving | ||
9 | 274 | modules/Ubuntu/Components/Pickers/Dialer.qml | 275 | modules/Ubuntu/Components/Pickers/Dialer.qml |
10 | 275 | StyledItem | 276 | StyledItem |
11 | 276 | property real minimumValue | 277 | property real minimumValue |
12 | @@ -296,6 +297,8 @@ | |||
13 | 296 | property Component delegate | 297 | property Component delegate |
14 | 297 | property int selectedIndex | 298 | property int selectedIndex |
15 | 298 | property bool live | 299 | property bool live |
16 | 300 | readonly property bool moving | ||
17 | 301 | function positionViewAtIndex(index) | ||
18 | 299 | property int __clickedIndex | 302 | property int __clickedIndex |
19 | 300 | modules/Ubuntu/Components/Pickers/PickerDelegate.qml | 303 | modules/Ubuntu/Components/Pickers/PickerDelegate.qml |
20 | 301 | AbstractButton | 304 | AbstractButton |
21 | 302 | 305 | ||
22 | === modified file 'modules/Ubuntu/Components/Pickers/DatePicker.qml' | |||
23 | --- modules/Ubuntu/Components/Pickers/DatePicker.qml 2014-01-10 15:33:02 +0000 | |||
24 | +++ modules/Ubuntu/Components/Pickers/DatePicker.qml 2014-03-06 14:36:38 +0000 | |||
25 | @@ -292,6 +292,14 @@ | |||
26 | 292 | */ | 292 | */ |
27 | 293 | property var locale: Qt.locale() | 293 | property var locale: Qt.locale() |
28 | 294 | 294 | ||
29 | 295 | /*! | ||
30 | 296 | \qmlproperty bool moving | ||
31 | 297 | \readonly | ||
32 | 298 | The property holds whether the component's pickers are moving. | ||
33 | 299 | \sa Picker::moving | ||
34 | 300 | */ | ||
35 | 301 | readonly property alias moving: positioner.moving | ||
36 | 302 | |||
37 | 295 | implicitWidth: units.gu(36) | 303 | implicitWidth: units.gu(36) |
38 | 296 | implicitHeight: units.gu(20) | 304 | implicitHeight: units.gu(20) |
39 | 297 | 305 | ||
40 | @@ -453,6 +461,13 @@ | |||
41 | 453 | */ | 461 | */ |
42 | 454 | id: tumblerModel | 462 | id: tumblerModel |
43 | 455 | 463 | ||
44 | 464 | /* | ||
45 | 465 | Signal triggered when the model is about to remove a picker. We cannot rely on | ||
46 | 466 | rowAboutToBeRemoved, as by the time the signal is called the list element is | ||
47 | 467 | already removed from the model. | ||
48 | 468 | */ | ||
49 | 469 | signal pickerRemoved(int index) | ||
50 | 470 | |||
51 | 456 | // the function checks whether a pickerModel was added or not | 471 | // the function checks whether a pickerModel was added or not |
52 | 457 | // returns the index of the model object the pickerModel was found | 472 | // returns the index of the model object the pickerModel was found |
53 | 458 | // or -1 on error. | 473 | // or -1 on error. |
54 | @@ -480,6 +495,7 @@ | |||
55 | 480 | function removePicker(name) { | 495 | function removePicker(name) { |
56 | 481 | var idx = pickerModelIndex(name); | 496 | var idx = pickerModelIndex(name); |
57 | 482 | if (idx >= 0) { | 497 | if (idx >= 0) { |
58 | 498 | pickerRemoved(idx); | ||
59 | 483 | remove(idx); | 499 | remove(idx); |
60 | 484 | } | 500 | } |
61 | 485 | } | 501 | } |
62 | 486 | 502 | ||
63 | === modified file 'modules/Ubuntu/Components/Pickers/Picker.qml' | |||
64 | --- modules/Ubuntu/Components/Pickers/Picker.qml 2013-12-10 19:28:19 +0000 | |||
65 | +++ modules/Ubuntu/Components/Pickers/Picker.qml 2014-03-06 14:36:38 +0000 | |||
66 | @@ -121,6 +121,40 @@ | |||
67 | 121 | */ | 121 | */ |
68 | 122 | property bool live: false | 122 | property bool live: false |
69 | 123 | 123 | ||
70 | 124 | /*! | ||
71 | 125 | The property holds whether the picker's view is moving due to the user | ||
72 | 126 | interaction either by dragging, flicking or due to the manual change of | ||
73 | 127 | the selectedIndex property. | ||
74 | 128 | */ | ||
75 | 129 | readonly property bool moving: (loader.item ? loader.item.moving : false) || movingPoll.indexChanging | ||
76 | 130 | |||
77 | 131 | /*! | ||
78 | 132 | The function positions the picker's view to the given index without animating | ||
79 | 133 | the view. The component must be ready when calling the function, e.g. to make | ||
80 | 134 | sure the Picker shows up at the given index, do the following: | ||
81 | 135 | \qml | ||
82 | 136 | Picker { | ||
83 | 137 | model: 120 | ||
84 | 138 | delegate: PickerDelegate { | ||
85 | 139 | Label { | ||
86 | 140 | anchors.fill: parent | ||
87 | 141 | verticalCenter: Text.AlignVCenter | ||
88 | 142 | text: modelData | ||
89 | 143 | } | ||
90 | 144 | } | ||
91 | 145 | Component.onCompleted: positionViewAtIndex(10) | ||
92 | 146 | } | ||
93 | 147 | \endqml | ||
94 | 148 | */ | ||
95 | 149 | function positionViewAtIndex(index) { | ||
96 | 150 | if (!loader.item || !internals.completed) { | ||
97 | 151 | return; | ||
98 | 152 | } | ||
99 | 153 | loader.item.positionViewAtIndex(index, loader.isListView ? ListView.SnapPosition : PathView.SnapPosition); | ||
100 | 154 | // update selectedIndex | ||
101 | 155 | selectedIndex = loader.item.currentIndex; | ||
102 | 156 | } | ||
103 | 157 | |||
104 | 124 | implicitWidth: units.gu(8) | 158 | implicitWidth: units.gu(8) |
105 | 125 | implicitHeight: units.gu(20) | 159 | implicitHeight: units.gu(20) |
106 | 126 | 160 | ||
107 | @@ -137,6 +171,34 @@ | |||
108 | 137 | when: __styleInstance.hasOwnProperty("view") && loader.item | 171 | when: __styleInstance.hasOwnProperty("view") && loader.item |
109 | 138 | } | 172 | } |
110 | 139 | 173 | ||
111 | 174 | /* | ||
112 | 175 | ListView/PathView do not change moding property when the current index is | ||
113 | 176 | changed manually. Therefore we use an idle timer to poll the contentY to | ||
114 | 177 | detect whether the views are still moving. | ||
115 | 178 | PathView's currentIndex changes while the component is moving, however this | ||
116 | 179 | is not true for ListView. | ||
117 | 180 | */ | ||
118 | 181 | Timer { | ||
119 | 182 | id: movingPoll | ||
120 | 183 | interval: 50 | ||
121 | 184 | running: false | ||
122 | 185 | property bool indexChanging: false | ||
123 | 186 | property real prevContentY | ||
124 | 187 | onTriggered: { | ||
125 | 188 | if (prevContentY === loader.item.contentY) { | ||
126 | 189 | indexChanging = false; | ||
127 | 190 | } else { | ||
128 | 191 | kick(); | ||
129 | 192 | } | ||
130 | 193 | } | ||
131 | 194 | function kick() { | ||
132 | 195 | if (!loader.item) return; | ||
133 | 196 | indexChanging = true; | ||
134 | 197 | prevContentY = loader.item.contentY; | ||
135 | 198 | running = true; | ||
136 | 199 | } | ||
137 | 200 | } | ||
138 | 201 | |||
139 | 140 | // tumbler | 202 | // tumbler |
140 | 141 | Loader { | 203 | Loader { |
141 | 142 | id: loader | 204 | id: loader |
142 | @@ -171,12 +233,14 @@ | |||
143 | 171 | } | 233 | } |
144 | 172 | } | 234 | } |
145 | 173 | onCurrentIndexChanged: { | 235 | onCurrentIndexChanged: { |
146 | 236 | movingPoll.kick(); | ||
147 | 174 | if (!loader.completed) return; | 237 | if (!loader.completed) return; |
148 | 175 | if (picker.live || (modelWatcher.modelSize() <= 0) | 238 | if (picker.live || (modelWatcher.modelSize() <= 0) |
149 | 176 | || (picker.__clickedIndex >= 0 && (picker.__clickedIndex === loader.item.currentIndex)) | 239 | || (picker.__clickedIndex >= 0 && (picker.__clickedIndex === loader.item.currentIndex)) |
150 | 177 | || modelWatcher.cropping) { | 240 | || modelWatcher.cropping) { |
151 | 178 | picker.selectedIndex = loader.item.currentIndex; | 241 | picker.selectedIndex = loader.item.currentIndex; |
152 | 179 | modelWatcher.cropping = false; | 242 | modelWatcher.cropping = false; |
153 | 243 | picker.__clickedIndex = -1; | ||
154 | 180 | } | 244 | } |
155 | 181 | } | 245 | } |
156 | 182 | onModelChanged: { | 246 | onModelChanged: { |
157 | @@ -216,6 +280,8 @@ | |||
158 | 216 | property Item pickerItem: picker | 280 | property Item pickerItem: picker |
159 | 217 | // property holding view completion | 281 | // property holding view completion |
160 | 218 | property bool viewCompleted: false | 282 | property bool viewCompleted: false |
161 | 283 | // declared to ease moving detection | ||
162 | 284 | property real contentY: offset | ||
163 | 219 | anchors { | 285 | anchors { |
164 | 220 | top: parent ? parent.top : undefined | 286 | top: parent ? parent.top : undefined |
165 | 221 | bottom: parent ? parent.bottom : undefined | 287 | bottom: parent ? parent.bottom : undefined |
166 | 222 | 288 | ||
167 | === modified file 'modules/Ubuntu/Components/Pickers/PickerDelegate.qml' | |||
168 | --- modules/Ubuntu/Components/Pickers/PickerDelegate.qml 2013-12-10 16:52:07 +0000 | |||
169 | +++ modules/Ubuntu/Components/Pickers/PickerDelegate.qml 2014-03-06 14:36:38 +0000 | |||
170 | @@ -51,7 +51,7 @@ | |||
171 | 51 | 51 | ||
172 | 52 | QtObject { | 52 | QtObject { |
173 | 53 | id: internal | 53 | id: internal |
175 | 54 | property bool inListView: QuickUtils.className(pickerDelegate.parent) !== "QQuickPathView" | 54 | property bool inListView: pickerDelegate.parent && (QuickUtils.className(pickerDelegate.parent) !== "QQuickPathView") |
176 | 55 | property Item itemList: !inListView ? pickerDelegate.PathView.view : pickerDelegate.ListView.view | 55 | property Item itemList: !inListView ? pickerDelegate.PathView.view : pickerDelegate.ListView.view |
177 | 56 | property Picker picker: itemList ? itemList.pickerItem : null | 56 | property Picker picker: itemList ? itemList.pickerItem : null |
178 | 57 | } | 57 | } |
179 | 58 | 58 | ||
180 | === modified file 'modules/Ubuntu/Components/Pickers/PickerModelBase.qml' | |||
181 | --- modules/Ubuntu/Components/Pickers/PickerModelBase.qml 2013-12-10 16:52:07 +0000 | |||
182 | +++ modules/Ubuntu/Components/Pickers/PickerModelBase.qml 2014-03-06 14:36:38 +0000 | |||
183 | @@ -141,7 +141,14 @@ | |||
184 | 141 | if (!pickerCompleted || !pickerItem || resetting) { | 141 | if (!pickerCompleted || !pickerItem || resetting) { |
185 | 142 | return; | 142 | return; |
186 | 143 | } | 143 | } |
188 | 144 | pickerItem.selectedIndex = indexOf(); | 144 | // use animated index update only if the change had happened because of the delegate update |
189 | 145 | if (pickerItem.__clickedIndex >= 0) { | ||
190 | 146 | pickerItem.selectedIndex = indexOf(); | ||
191 | 147 | } else { | ||
192 | 148 | // in case the date property was changed due to binding/update, | ||
193 | 149 | // position tumbler without animating | ||
194 | 150 | pickerItem.positionViewAtIndex(indexOf()); | ||
195 | 151 | } | ||
196 | 145 | } | 152 | } |
197 | 146 | 153 | ||
198 | 147 | } | 154 | } |
199 | 148 | 155 | ||
200 | === modified file 'modules/Ubuntu/Components/Pickers/PickerRow.qml' | |||
201 | --- modules/Ubuntu/Components/Pickers/PickerRow.qml 2013-12-17 07:53:21 +0000 | |||
202 | +++ modules/Ubuntu/Components/Pickers/PickerRow.qml 2014-03-06 14:36:38 +0000 | |||
203 | @@ -35,10 +35,51 @@ | |||
204 | 35 | */ | 35 | */ |
205 | 36 | property real margins: units.gu(1.5) | 36 | property real margins: units.gu(1.5) |
206 | 37 | 37 | ||
207 | 38 | /* | ||
208 | 39 | Reports whether either of the pickers is moving | ||
209 | 40 | */ | ||
210 | 41 | property bool moving | ||
211 | 42 | |||
212 | 43 | // the following functions/properties should be kept private in case the | ||
213 | 44 | // component is ever decided to be published | ||
214 | 45 | |||
215 | 46 | function pickerMoving(isMoving) { | ||
216 | 47 | if (isMoving === undefined) { | ||
217 | 48 | isMoving = this.moving; | ||
218 | 49 | } | ||
219 | 50 | |||
220 | 51 | if (isMoving) { | ||
221 | 52 | row.moving = true; | ||
222 | 53 | } else { | ||
223 | 54 | for (var i = 0; i < row.model.count; i++) { | ||
224 | 55 | var pickerItem = model.get(i).pickerModel.pickerItem; | ||
225 | 56 | if (!pickerItem) return; | ||
226 | 57 | if (pickerItem.moving) { | ||
227 | 58 | row.moving = true; | ||
228 | 59 | return; | ||
229 | 60 | } | ||
230 | 61 | } | ||
231 | 62 | row.moving = false; | ||
232 | 63 | } | ||
233 | 64 | } | ||
234 | 65 | |||
235 | 66 | function disconnectPicker(index) { | ||
236 | 67 | var pickerItem = model.get(index).pickerModel.pickerItem; | ||
237 | 68 | if (pickerItem) { | ||
238 | 69 | pickerItem.onMovingChanged.disconnect(pickerMoving); | ||
239 | 70 | } | ||
240 | 71 | } | ||
241 | 72 | |||
242 | 73 | Connections { | ||
243 | 74 | target: row.model | ||
244 | 75 | onPickerRemoved: disconnectPicker(index) | ||
245 | 76 | } | ||
246 | 77 | |||
247 | 38 | objectName: "PickerRow_Positioner"; | 78 | objectName: "PickerRow_Positioner"; |
248 | 39 | 79 | ||
249 | 40 | Repeater { | 80 | Repeater { |
250 | 41 | id: rowRepeater | 81 | id: rowRepeater |
251 | 82 | onModelChanged: row.pickerMoving(true) | ||
252 | 42 | Picker { | 83 | Picker { |
253 | 43 | id: unitPicker | 84 | id: unitPicker |
254 | 44 | objectName: "PickerRow_" + pickerName | 85 | objectName: "PickerRow_" + pickerName |
255 | @@ -47,7 +88,7 @@ | |||
256 | 47 | circular: pickerModel.circular | 88 | circular: pickerModel.circular |
257 | 48 | live: false | 89 | live: false |
258 | 49 | width: pickerModel.pickerWidth | 90 | width: pickerModel.pickerWidth |
260 | 50 | height: parent.height | 91 | height: parent ? parent.height : 0 |
261 | 51 | 92 | ||
262 | 52 | style: Rectangle { | 93 | style: Rectangle { |
263 | 53 | anchors.fill: parent | 94 | anchors.fill: parent |
264 | @@ -56,7 +97,7 @@ | |||
265 | 56 | delegate: PickerDelegate { | 97 | delegate: PickerDelegate { |
266 | 57 | Label { | 98 | Label { |
267 | 58 | objectName: "PickerRow_PickerLabel" | 99 | objectName: "PickerRow_PickerLabel" |
269 | 59 | text: pickerModel.text(modelData) | 100 | text: pickerModel ? pickerModel.text(modelData) : "" |
270 | 60 | anchors.fill: parent | 101 | anchors.fill: parent |
271 | 61 | verticalAlignment: Text.AlignVCenter | 102 | verticalAlignment: Text.AlignVCenter |
272 | 62 | horizontalAlignment: Text.AlignHCenter | 103 | horizontalAlignment: Text.AlignHCenter |
273 | @@ -82,12 +123,14 @@ | |||
274 | 82 | pickerModel.reset(); | 123 | pickerModel.reset(); |
275 | 83 | pickerModel.resetLimits(textSizer, margins); | 124 | pickerModel.resetLimits(textSizer, margins); |
276 | 84 | pickerModel.resetCompleted(); | 125 | pickerModel.resetCompleted(); |
278 | 85 | selectedIndex = pickerModel.indexOf(); | 126 | positionViewAtIndex(pickerModel.indexOf()); |
279 | 86 | } | 127 | } |
280 | 87 | 128 | ||
281 | 88 | Component.onCompleted: { | 129 | Component.onCompleted: { |
282 | 89 | // update model with the item instance | 130 | // update model with the item instance |
283 | 90 | pickerModel.pickerItem = unitPicker; | 131 | pickerModel.pickerItem = unitPicker; |
284 | 132 | unitPicker.onMovingChanged.connect(pickerMoving.bind(unitPicker)); | ||
285 | 133 | row.pickerMoving(unitPicker.moving); | ||
286 | 91 | } | 134 | } |
287 | 92 | } | 135 | } |
288 | 93 | } | 136 | } |
289 | 94 | 137 | ||
290 | === modified file 'modules/Ubuntu/Components/Pickers/SecondsModel.qml' | |||
291 | --- modules/Ubuntu/Components/Pickers/SecondsModel.qml 2013-12-13 11:22:51 +0000 | |||
292 | +++ modules/Ubuntu/Components/Pickers/SecondsModel.qml 2014-03-06 14:36:38 +0000 | |||
293 | @@ -26,8 +26,8 @@ | |||
294 | 26 | 26 | ||
295 | 27 | clear(); | 27 | clear(); |
296 | 28 | from = minimum.getSeconds(); | 28 | from = minimum.getSeconds(); |
299 | 29 | var distance = (!maximum.isValid() || (minimum.daysTo(maximum) > 1) || (minimum.secondsTo(maximum) >= 60)) ? 59 : minimum.secondsTo(maximum); | 29 | var distance = (!maximum.isValid() || (minimum.secondsTo(maximum) >= 60)) ? 60 : minimum.secondsTo(maximum); |
300 | 30 | for (var i = 0; i <= distance; i++) { | 30 | for (var i = 0; i < distance; i++) { |
301 | 31 | append({"seconds": (from + i) % 60}); | 31 | append({"seconds": (from + i) % 60}); |
302 | 32 | } | 32 | } |
303 | 33 | 33 | ||
304 | 34 | 34 | ||
305 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/PickerDelegateStyle.qml' | |||
306 | --- modules/Ubuntu/Components/Themes/Ambiance/PickerDelegateStyle.qml 2013-12-09 06:39:07 +0000 | |||
307 | +++ modules/Ubuntu/Components/Themes/Ambiance/PickerDelegateStyle.qml 2014-03-06 14:36:38 +0000 | |||
308 | @@ -22,7 +22,7 @@ | |||
309 | 22 | property real maxFade: 0.95 | 22 | property real maxFade: 0.95 |
310 | 23 | property bool fadingEnabled: true | 23 | property bool fadingEnabled: true |
311 | 24 | 24 | ||
313 | 25 | property bool inListView: QuickUtils.className(styledItem.parent) !== "QQuickPathView" | 25 | property bool inListView: styledItem.parent && (QuickUtils.className(styledItem.parent) !== "QQuickPathView") |
314 | 26 | property Item itemList: inListView ? styledItem.ListView.view : styledItem.PathView.view | 26 | property Item itemList: inListView ? styledItem.ListView.view : styledItem.PathView.view |
315 | 27 | property Item picker: styledItem.picker | 27 | property Item picker: styledItem.picker |
316 | 28 | property Item highlightItem: itemList.highlightItem | 28 | property Item highlightItem: itemList.highlightItem |
317 | 29 | 29 | ||
318 | === modified file 'modules/Ubuntu/Components/plugin/quickutils.cpp' | |||
319 | --- modules/Ubuntu/Components/plugin/quickutils.cpp 2014-03-01 12:52:25 +0000 | |||
320 | +++ modules/Ubuntu/Components/plugin/quickutils.cpp 2014-03-06 14:36:38 +0000 | |||
321 | @@ -112,6 +112,9 @@ | |||
322 | 112 | */ | 112 | */ |
323 | 113 | QString QuickUtils::className(QObject *item) | 113 | QString QuickUtils::className(QObject *item) |
324 | 114 | { | 114 | { |
325 | 115 | if (!item) { | ||
326 | 116 | return QString(); | ||
327 | 117 | } | ||
328 | 115 | QString result = item->metaObject()->className(); | 118 | QString result = item->metaObject()->className(); |
329 | 116 | return result.left(result.indexOf("_QML")); | 119 | return result.left(result.indexOf("_QML")); |
330 | 117 | } | 120 | } |
331 | 118 | 121 | ||
332 | === modified file 'tests/resources/pickers/DatePickerTest.qml' | |||
333 | --- tests/resources/pickers/DatePickerTest.qml 2013-12-19 11:08:50 +0000 | |||
334 | +++ tests/resources/pickers/DatePickerTest.qml 2014-03-06 14:36:38 +0000 | |||
335 | @@ -32,6 +32,7 @@ | |||
336 | 32 | date: new Date() | 32 | date: new Date() |
337 | 33 | 33 | ||
338 | 34 | onDateChanged: print("CHANGED DATE=" + Qt.formatDateTime(date, "yyyy/MM/dd, hh:mm:ss")) | 34 | onDateChanged: print("CHANGED DATE=" + Qt.formatDateTime(date, "yyyy/MM/dd, hh:mm:ss")) |
339 | 35 | onMovingChanged: print("MOVING?", moving) | ||
340 | 35 | } | 36 | } |
341 | 36 | Slider { | 37 | Slider { |
342 | 37 | value: 0.0//units.gu(36) | 38 | value: 0.0//units.gu(36) |
343 | @@ -47,21 +48,25 @@ | |||
344 | 47 | spacing: units.gu(1) | 48 | spacing: units.gu(1) |
345 | 48 | Button { | 49 | Button { |
346 | 49 | text: "HU" | 50 | text: "HU" |
347 | 51 | width: units.gu(5) | ||
348 | 50 | height: units.gu(2) | 52 | height: units.gu(2) |
349 | 51 | onClicked: picker.locale = Qt.locale("hu_HU") | 53 | onClicked: picker.locale = Qt.locale("hu_HU") |
350 | 52 | } | 54 | } |
351 | 53 | Button { | 55 | Button { |
352 | 54 | text: "DE" | 56 | text: "DE" |
353 | 57 | width: units.gu(5) | ||
354 | 55 | height: units.gu(2) | 58 | height: units.gu(2) |
355 | 56 | onClicked: picker.locale = Qt.locale("de_DE") | 59 | onClicked: picker.locale = Qt.locale("de_DE") |
356 | 57 | } | 60 | } |
357 | 58 | Button { | 61 | Button { |
358 | 59 | text: "EN(US)" | 62 | text: "EN(US)" |
359 | 63 | width: units.gu(9) | ||
360 | 60 | height: units.gu(2) | 64 | height: units.gu(2) |
361 | 61 | onClicked: picker.locale = Qt.locale("en_US") | 65 | onClicked: picker.locale = Qt.locale("en_US") |
362 | 62 | } | 66 | } |
363 | 63 | Button { | 67 | Button { |
364 | 64 | text: "FI" | 68 | text: "FI" |
365 | 69 | width: units.gu(5) | ||
366 | 65 | height: units.gu(2) | 70 | height: units.gu(2) |
367 | 66 | onClicked: { | 71 | onClicked: { |
368 | 67 | picker.locale = Qt.locale("fi_FI") | 72 | picker.locale = Qt.locale("fi_FI") |
369 | 68 | 73 | ||
370 | === modified file 'tests/resources/pickers/PickerTest.qml' | |||
371 | --- tests/resources/pickers/PickerTest.qml 2013-12-09 06:39:07 +0000 | |||
372 | +++ tests/resources/pickers/PickerTest.qml 2014-03-06 14:36:38 +0000 | |||
373 | @@ -42,6 +42,7 @@ | |||
374 | 42 | height: units.gu(40) | 42 | height: units.gu(40) |
375 | 43 | model: pickerModel | 43 | model: pickerModel |
376 | 44 | delegate: PickerDelegate { | 44 | delegate: PickerDelegate { |
377 | 45 | property string text: modelData ? modelData : "" | ||
378 | 45 | Label { | 46 | Label { |
379 | 46 | anchors.fill: parent | 47 | anchors.fill: parent |
380 | 47 | horizontalAlignment: Text.AlignHCenter | 48 | horizontalAlignment: Text.AlignHCenter |
381 | @@ -50,6 +51,7 @@ | |||
382 | 50 | } | 51 | } |
383 | 51 | } | 52 | } |
384 | 52 | onSelectedIndexChanged: print("circular index="+selectedIndex) | 53 | onSelectedIndexChanged: print("circular index="+selectedIndex) |
385 | 54 | onMovingChanged: print("MOVING?", moving) | ||
386 | 53 | } | 55 | } |
387 | 54 | 56 | ||
388 | 55 | Picker { | 57 | Picker { |
389 | @@ -59,6 +61,7 @@ | |||
390 | 59 | model: pickerModel | 61 | model: pickerModel |
391 | 60 | circular: false | 62 | circular: false |
392 | 61 | delegate: PickerDelegate { | 63 | delegate: PickerDelegate { |
393 | 64 | property string text: modelData ? modelData : "" | ||
394 | 62 | Label { | 65 | Label { |
395 | 63 | anchors.fill: parent | 66 | anchors.fill: parent |
396 | 64 | horizontalAlignment: Text.AlignHCenter | 67 | horizontalAlignment: Text.AlignHCenter |
397 | @@ -67,6 +70,7 @@ | |||
398 | 67 | } | 70 | } |
399 | 68 | } | 71 | } |
400 | 69 | onSelectedIndexChanged: print("linear index="+selectedIndex) | 72 | onSelectedIndexChanged: print("linear index="+selectedIndex) |
401 | 73 | onMovingChanged: print("MOVING?", moving) | ||
402 | 70 | } | 74 | } |
403 | 71 | 75 | ||
404 | 72 | Picker { | 76 | Picker { |
405 | @@ -82,6 +86,7 @@ | |||
406 | 82 | } | 86 | } |
407 | 83 | } | 87 | } |
408 | 84 | onSelectedIndexChanged: print("circular index="+selectedIndex) | 88 | onSelectedIndexChanged: print("circular index="+selectedIndex) |
409 | 89 | onMovingChanged: print("MOVING?", moving) | ||
410 | 85 | } | 90 | } |
411 | 86 | 91 | ||
412 | 87 | Picker { | 92 | Picker { |
413 | @@ -98,6 +103,7 @@ | |||
414 | 98 | } | 103 | } |
415 | 99 | } | 104 | } |
416 | 100 | onSelectedIndexChanged: print("linear index="+selectedIndex) | 105 | onSelectedIndexChanged: print("linear index="+selectedIndex) |
417 | 106 | onMovingChanged: print("MOVING?", moving) | ||
418 | 101 | } | 107 | } |
419 | 102 | } | 108 | } |
420 | 103 | 109 | ||
421 | 104 | 110 | ||
422 | === modified file 'tests/unit_x11/tst_components/tst_datepicker.qml' | |||
423 | --- tests/unit_x11/tst_components/tst_datepicker.qml 2014-01-07 14:41:57 +0000 | |||
424 | +++ tests/unit_x11/tst_components/tst_datepicker.qml 2014-03-06 14:36:38 +0000 | |||
425 | @@ -25,58 +25,44 @@ | |||
426 | 25 | width: units.gu(40) | 25 | width: units.gu(40) |
427 | 26 | height: units.gu(71) | 26 | height: units.gu(71) |
428 | 27 | 27 | ||
431 | 28 | DatePicker { | 28 | Component { |
432 | 29 | id: picker | 29 | id: testComponent |
433 | 30 | DatePicker { | ||
434 | 31 | width: testSuite.width | ||
435 | 32 | } | ||
436 | 33 | } | ||
437 | 34 | Loader { | ||
438 | 35 | id: pickerLoader | ||
439 | 36 | asynchronous: false | ||
440 | 30 | width: parent.width | 37 | width: parent.width |
441 | 31 | } | 38 | } |
442 | 32 | 39 | ||
443 | 33 | SignalSpy { | ||
444 | 34 | id: modeChange | ||
445 | 35 | target: picker | ||
446 | 36 | signalName: "modeChanged" | ||
447 | 37 | } | ||
448 | 38 | |||
449 | 39 | SignalSpy { | ||
450 | 40 | id: dateChange | ||
451 | 41 | target: picker | ||
452 | 42 | signalName: "dateChanged" | ||
453 | 43 | } | ||
454 | 44 | |||
455 | 45 | SignalSpy { | ||
456 | 46 | id: yearChange | ||
457 | 47 | target: picker | ||
458 | 48 | signalName: "yearChanged" | ||
459 | 49 | } | ||
460 | 50 | |||
461 | 51 | SignalSpy { | ||
462 | 52 | id: monthChange | ||
463 | 53 | target: picker | ||
464 | 54 | signalName: "monthChanged" | ||
465 | 55 | } | ||
466 | 56 | |||
467 | 57 | SignalSpy { | ||
468 | 58 | id: dayChange | ||
469 | 59 | target: picker | ||
470 | 60 | signalName: "dayChanged" | ||
471 | 61 | } | ||
472 | 62 | |||
473 | 63 | SignalSpy { | ||
474 | 64 | id: weekChange | ||
475 | 65 | target: picker | ||
476 | 66 | signalName: "weekChanged" | ||
477 | 67 | } | ||
478 | 68 | |||
479 | 69 | UbuntuTestCase { | 40 | UbuntuTestCase { |
480 | 70 | name: "DatePickerAPI" | 41 | name: "DatePickerAPI" |
481 | 71 | when: windowShown | 42 | when: windowShown |
482 | 72 | 43 | ||
483 | 44 | readonly property DatePicker picker: pickerLoader.item | ||
484 | 45 | |||
485 | 46 | function init() { | ||
486 | 47 | pickerLoader.sourceComponent = testComponent; | ||
487 | 48 | tryCompareFunction(function(){return pickerLoader.status}, Loader.Ready); | ||
488 | 49 | waitPickerMoving(); | ||
489 | 50 | } | ||
490 | 51 | function cleanup() { | ||
491 | 52 | pickerLoader.sourceComponent = undefined; | ||
492 | 53 | } | ||
493 | 54 | function waitPickerMoving() { | ||
494 | 55 | waitForRendering(picker); | ||
495 | 56 | tryCompareFunction(function(){return picker.moving}, false); | ||
496 | 57 | } | ||
497 | 58 | |||
498 | 73 | function getPickerLabel(picker, name) { | 59 | function getPickerLabel(picker, name) { |
499 | 74 | var pickerItem = findChild(picker, name); | 60 | var pickerItem = findChild(picker, name); |
500 | 75 | var pickerCurrent = findChild(pickerItem, "Picker_ViewLoader"); | 61 | var pickerCurrent = findChild(pickerItem, "Picker_ViewLoader"); |
501 | 76 | return findChild(pickerCurrent.item.currentItem, "PickerRow_PickerLabel"); | 62 | return findChild(pickerCurrent.item.currentItem, "PickerRow_PickerLabel"); |
502 | 77 | } | 63 | } |
503 | 78 | function getPickerModel(picker, name) { | 64 | function getPickerModel(picker, name) { |
505 | 79 | var pickerItem = findChild(picker, name); | 65 | var pickerItem = findInvisibleChild(picker, name); |
506 | 80 | return pickerItem ? pickerItem.model : undefined; | 66 | return pickerItem ? pickerItem.model : undefined; |
507 | 81 | } | 67 | } |
508 | 82 | function setHMS(date, h, m, s) { | 68 | function setHMS(date, h, m, s) { |
509 | @@ -114,213 +100,149 @@ | |||
510 | 114 | var newMode = "Years|Months"; | 100 | var newMode = "Years|Months"; |
511 | 115 | var pickerCount = 2 + 1; // +1 is the Repeater | 101 | var pickerCount = 2 + 1; // +1 is the Repeater |
512 | 116 | picker.mode = newMode; | 102 | picker.mode = newMode; |
514 | 117 | wait(500); | 103 | waitPickerMoving(); |
515 | 118 | var positioner = findChild(picker, "PickerRow_Positioner"); | 104 | var positioner = findChild(picker, "PickerRow_Positioner"); |
516 | 119 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 105 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
517 | 120 | |||
518 | 121 | picker.mode = "Years|Months|Days"; | ||
519 | 122 | pickerCount = 3 + 1; // +1 is the Repeater | ||
520 | 123 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
521 | 124 | } | 106 | } |
522 | 125 | 107 | ||
523 | 126 | function test_1_changeModeMD() { | 108 | function test_1_changeModeMD() { |
524 | 127 | var newMode = "Days|Months"; | 109 | var newMode = "Days|Months"; |
525 | 128 | var pickerCount = 2 + 1; // +1 is the Repeater | 110 | var pickerCount = 2 + 1; // +1 is the Repeater |
526 | 129 | picker.mode = newMode; | 111 | picker.mode = newMode; |
528 | 130 | wait(500); | 112 | waitPickerMoving(); |
529 | 131 | var positioner = findChild(picker, "PickerRow_Positioner"); | 113 | var positioner = findChild(picker, "PickerRow_Positioner"); |
530 | 132 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 114 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
531 | 133 | |||
532 | 134 | picker.mode = "Years|Months|Days"; | ||
533 | 135 | pickerCount = 3 + 1; // +1 is the Repeater | ||
534 | 136 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
535 | 137 | } | 115 | } |
536 | 138 | 116 | ||
537 | 139 | function test_1_changeModeYD() { | 117 | function test_1_changeModeYD() { |
538 | 140 | var newMode = "Years|Days"; | 118 | var newMode = "Years|Days"; |
539 | 141 | var pickerCount = 2 + 1; // +1 is the Repeater | 119 | var pickerCount = 2 + 1; // +1 is the Repeater |
540 | 142 | picker.mode = newMode; | 120 | picker.mode = newMode; |
542 | 143 | wait(500); | 121 | // no rendering is expected, no need to wait |
543 | 144 | var positioner = findChild(picker, "PickerRow_Positioner"); | 122 | var positioner = findChild(picker, "PickerRow_Positioner"); |
544 | 145 | expectFailContinue("", "Invalid mode"); | 123 | expectFailContinue("", "Invalid mode"); |
545 | 146 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 124 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
546 | 147 | |||
547 | 148 | picker.mode = "Years|Months|Days"; | ||
548 | 149 | pickerCount = 3 + 1; // +1 is the Repeater | ||
549 | 150 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
550 | 151 | } | 125 | } |
551 | 152 | 126 | ||
552 | 153 | function test_1_changeModeY() { | 127 | function test_1_changeModeY() { |
553 | 154 | var newMode = "Years"; | 128 | var newMode = "Years"; |
554 | 155 | var pickerCount = 1 + 1; // +1 is the Repeater | 129 | var pickerCount = 1 + 1; // +1 is the Repeater |
555 | 156 | picker.mode = newMode; | 130 | picker.mode = newMode; |
557 | 157 | wait(500); | 131 | waitPickerMoving(); |
558 | 158 | var positioner = findChild(picker, "PickerRow_Positioner"); | 132 | var positioner = findChild(picker, "PickerRow_Positioner"); |
559 | 159 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 133 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
560 | 160 | |||
561 | 161 | picker.mode = "Years|Months|Days"; | ||
562 | 162 | pickerCount = 3 + 1; // +1 is the Repeater | ||
563 | 163 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
564 | 164 | } | 134 | } |
565 | 165 | 135 | ||
566 | 166 | function test_1_changeModeM() { | 136 | function test_1_changeModeM() { |
567 | 167 | var newMode = "Months"; | 137 | var newMode = "Months"; |
568 | 168 | var pickerCount = 1 + 1; // +1 is the Repeater | 138 | var pickerCount = 1 + 1; // +1 is the Repeater |
569 | 169 | picker.mode = newMode; | 139 | picker.mode = newMode; |
571 | 170 | wait(500); | 140 | waitPickerMoving(); |
572 | 171 | var positioner = findChild(picker, "PickerRow_Positioner"); | 141 | var positioner = findChild(picker, "PickerRow_Positioner"); |
573 | 172 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 142 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
574 | 173 | |||
575 | 174 | picker.mode = "Years|Months|Days"; | ||
576 | 175 | pickerCount = 3 + 1; // +1 is the Repeater | ||
577 | 176 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
578 | 177 | } | 143 | } |
579 | 178 | 144 | ||
580 | 179 | function test_1_changeModeD() { | 145 | function test_1_changeModeD() { |
581 | 180 | var newMode = "Days"; | 146 | var newMode = "Days"; |
582 | 181 | var pickerCount = 1 + 1; // +1 is the Repeater | 147 | var pickerCount = 1 + 1; // +1 is the Repeater |
583 | 182 | picker.mode = newMode; | 148 | picker.mode = newMode; |
585 | 183 | wait(500); | 149 | waitPickerMoving(); |
586 | 184 | var positioner = findChild(picker, "PickerRow_Positioner"); | 150 | var positioner = findChild(picker, "PickerRow_Positioner"); |
587 | 185 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 151 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
588 | 186 | |||
589 | 187 | picker.mode = "Years|Months|Days"; | ||
590 | 188 | pickerCount = 3 + 1; // +1 is the Repeater | ||
591 | 189 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
592 | 190 | } | 152 | } |
593 | 191 | 153 | ||
594 | 192 | function test_1_changeModeHMS() { | 154 | function test_1_changeModeHMS() { |
595 | 193 | var newMode = "Hours|Minutes|Seconds"; | 155 | var newMode = "Hours|Minutes|Seconds"; |
596 | 194 | var pickerCount = 3 + 1; // +1 is the Repeater | 156 | var pickerCount = 3 + 1; // +1 is the Repeater |
597 | 195 | picker.mode = newMode; | 157 | picker.mode = newMode; |
599 | 196 | wait(500); | 158 | waitPickerMoving(); |
600 | 197 | var positioner = findChild(picker, "PickerRow_Positioner"); | 159 | var positioner = findChild(picker, "PickerRow_Positioner"); |
601 | 198 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 160 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
602 | 199 | |||
603 | 200 | picker.mode = "Years|Months|Days"; | ||
604 | 201 | pickerCount = 3 + 1; // +1 is the Repeater | ||
605 | 202 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
606 | 203 | } | 161 | } |
607 | 204 | 162 | ||
608 | 205 | function test_1_changeModeHM() { | 163 | function test_1_changeModeHM() { |
609 | 206 | var newMode = "Hours|Minutes"; | 164 | var newMode = "Hours|Minutes"; |
610 | 207 | var pickerCount = 2 + 1; // +1 is the Repeater | 165 | var pickerCount = 2 + 1; // +1 is the Repeater |
611 | 208 | picker.mode = newMode; | 166 | picker.mode = newMode; |
613 | 209 | wait(500); | 167 | waitPickerMoving(); |
614 | 210 | var positioner = findChild(picker, "PickerRow_Positioner"); | 168 | var positioner = findChild(picker, "PickerRow_Positioner"); |
615 | 211 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 169 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
616 | 212 | |||
617 | 213 | picker.mode = "Years|Months|Days"; | ||
618 | 214 | pickerCount = 3 + 1; // +1 is the Repeater | ||
619 | 215 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
620 | 216 | } | 170 | } |
621 | 217 | 171 | ||
622 | 218 | function test_1_changeModeMS() { | 172 | function test_1_changeModeMS() { |
623 | 219 | var newMode = "Minutes|Seconds"; | 173 | var newMode = "Minutes|Seconds"; |
624 | 220 | var pickerCount = 2 + 1; // +1 is the Repeater | 174 | var pickerCount = 2 + 1; // +1 is the Repeater |
625 | 221 | picker.mode = newMode; | 175 | picker.mode = newMode; |
627 | 222 | wait(500); | 176 | waitPickerMoving(); |
628 | 223 | var positioner = findChild(picker, "PickerRow_Positioner"); | 177 | var positioner = findChild(picker, "PickerRow_Positioner"); |
629 | 224 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 178 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
630 | 225 | |||
631 | 226 | picker.mode = "Years|Months|Days"; | ||
632 | 227 | pickerCount = 3 + 1; // +1 is the Repeater | ||
633 | 228 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
634 | 229 | } | 179 | } |
635 | 230 | 180 | ||
636 | 231 | function test_1_changeModeHS() { | 181 | function test_1_changeModeHS() { |
637 | 232 | var newMode = "Hours|Seconds"; | 182 | var newMode = "Hours|Seconds"; |
638 | 233 | var pickerCount = 2 + 1; // +1 is the Repeater | 183 | var pickerCount = 2 + 1; // +1 is the Repeater |
639 | 234 | picker.mode = newMode; | 184 | picker.mode = newMode; |
641 | 235 | wait(500); | 185 | waitPickerMoving(); |
642 | 236 | var positioner = findChild(picker, "PickerRow_Positioner"); | 186 | var positioner = findChild(picker, "PickerRow_Positioner"); |
643 | 237 | expectFailContinue("", "cannot set mode to Hours|Minutes"); | 187 | expectFailContinue("", "cannot set mode to Hours|Minutes"); |
644 | 238 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 188 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
645 | 239 | |||
646 | 240 | picker.mode = "Years|Months|Days"; | ||
647 | 241 | pickerCount = 3 + 1; // +1 is the Repeater | ||
648 | 242 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
649 | 243 | } | 189 | } |
650 | 244 | 190 | ||
651 | 245 | function test_1_changeModeH() { | 191 | function test_1_changeModeH() { |
652 | 246 | var newMode = "Hours"; | 192 | var newMode = "Hours"; |
653 | 247 | var pickerCount = 1 + 1; // +1 is the Repeater | 193 | var pickerCount = 1 + 1; // +1 is the Repeater |
654 | 248 | picker.mode = newMode; | 194 | picker.mode = newMode; |
656 | 249 | wait(500); | 195 | waitPickerMoving(); |
657 | 250 | var positioner = findChild(picker, "PickerRow_Positioner"); | 196 | var positioner = findChild(picker, "PickerRow_Positioner"); |
658 | 251 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 197 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
659 | 252 | |||
660 | 253 | picker.mode = "Years|Months|Days"; | ||
661 | 254 | pickerCount = 3 + 1; // +1 is the Repeater | ||
662 | 255 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
663 | 256 | } | 198 | } |
664 | 257 | 199 | ||
665 | 258 | function test_1_changeModeMinute() { | 200 | function test_1_changeModeMinute() { |
666 | 259 | var newMode = "Minutes"; | 201 | var newMode = "Minutes"; |
667 | 260 | var pickerCount = 1 + 1; // +1 is the Repeater | 202 | var pickerCount = 1 + 1; // +1 is the Repeater |
668 | 261 | picker.mode = newMode; | 203 | picker.mode = newMode; |
670 | 262 | wait(500); | 204 | waitPickerMoving(); |
671 | 263 | var positioner = findChild(picker, "PickerRow_Positioner"); | 205 | var positioner = findChild(picker, "PickerRow_Positioner"); |
672 | 264 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 206 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
673 | 265 | |||
674 | 266 | picker.mode = "Years|Months|Days"; | ||
675 | 267 | pickerCount = 3 + 1; // +1 is the Repeater | ||
676 | 268 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
677 | 269 | } | 207 | } |
678 | 270 | 208 | ||
679 | 271 | function test_1_changeModeS() { | 209 | function test_1_changeModeS() { |
680 | 272 | var newMode = "Seconds"; | 210 | var newMode = "Seconds"; |
681 | 273 | var pickerCount = 1 + 1; // +1 is the Repeater | 211 | var pickerCount = 1 + 1; // +1 is the Repeater |
682 | 274 | picker.mode = newMode; | 212 | picker.mode = newMode; |
684 | 275 | wait(500); | 213 | waitPickerMoving(); |
685 | 276 | var positioner = findChild(picker, "PickerRow_Positioner"); | 214 | var positioner = findChild(picker, "PickerRow_Positioner"); |
686 | 277 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 215 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
687 | 278 | |||
688 | 279 | picker.mode = "Years|Months|Days"; | ||
689 | 280 | pickerCount = 3 + 1; // +1 is the Repeater | ||
690 | 281 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
691 | 282 | } | 216 | } |
692 | 283 | 217 | ||
693 | 284 | function test_1_changeModeYMDHMS() { | 218 | function test_1_changeModeYMDHMS() { |
694 | 285 | var newMode = "Years|Months|Days|Hours|Minutes|Seconds"; | 219 | var newMode = "Years|Months|Days|Hours|Minutes|Seconds"; |
695 | 286 | var pickerCount = 6 + 1; // +1 is the Repeater | 220 | var pickerCount = 6 + 1; // +1 is the Repeater |
696 | 287 | picker.mode = newMode; | 221 | picker.mode = newMode; |
698 | 288 | wait(500); | 222 | waitPickerMoving(); |
699 | 289 | var positioner = findChild(picker, "PickerRow_Positioner"); | 223 | var positioner = findChild(picker, "PickerRow_Positioner"); |
700 | 290 | expectFailContinue("", "cannot combine date and time pickers"); | 224 | expectFailContinue("", "cannot combine date and time pickers"); |
701 | 291 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 225 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
702 | 292 | |||
703 | 293 | picker.mode = "Years|Months|Days"; | ||
704 | 294 | pickerCount = 3 + 1; // +1 is the Repeater | ||
705 | 295 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
706 | 296 | } | 226 | } |
707 | 297 | 227 | ||
708 | 298 | function test_1_changeModeYH() { | 228 | function test_1_changeModeYH() { |
709 | 299 | var newMode = "Years|Hours"; | 229 | var newMode = "Years|Hours"; |
710 | 300 | var pickerCount = 2 + 1; // +1 is the Repeater | 230 | var pickerCount = 2 + 1; // +1 is the Repeater |
711 | 301 | picker.mode = newMode; | 231 | picker.mode = newMode; |
713 | 302 | wait(500); | 232 | waitPickerMoving(); |
714 | 303 | var positioner = findChild(picker, "PickerRow_Positioner"); | 233 | var positioner = findChild(picker, "PickerRow_Positioner"); |
715 | 304 | expectFailContinue("", "cannot combine date and time pickers"); | 234 | expectFailContinue("", "cannot combine date and time pickers"); |
716 | 305 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 235 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
717 | 306 | |||
718 | 307 | picker.mode = "Years|Months|Days"; | ||
719 | 308 | pickerCount = 3 + 1; // +1 is the Repeater | ||
720 | 309 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
721 | 310 | } | 236 | } |
722 | 311 | 237 | ||
723 | 312 | function test_1_changeModeUnhandled() { | 238 | function test_1_changeModeUnhandled() { |
724 | 313 | var newMode = "Years|Whatever"; | 239 | var newMode = "Years|Whatever"; |
725 | 314 | var pickerCount = 2 + 1; // +1 is the Repeater | 240 | var pickerCount = 2 + 1; // +1 is the Repeater |
726 | 315 | picker.mode = newMode; | 241 | picker.mode = newMode; |
728 | 316 | wait(500); | 242 | // no rendering is expected, no need to wait |
729 | 317 | var positioner = findChild(picker, "PickerRow_Positioner"); | 243 | var positioner = findChild(picker, "PickerRow_Positioner"); |
730 | 318 | expectFailContinue("", "unhandled mode flag should not pass"); | 244 | expectFailContinue("", "unhandled mode flag should not pass"); |
731 | 319 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | 245 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); |
732 | 320 | |||
733 | 321 | picker.mode = "Years|Months|Days"; | ||
734 | 322 | pickerCount = 3 + 1; // +1 is the Repeater | ||
735 | 323 | compare(positioner.children.length, pickerCount, "invalid amount of pickers"); | ||
736 | 324 | } | 246 | } |
737 | 325 | 247 | ||
738 | 326 | function test_1_changeLocale() { | 248 | function test_1_changeLocale() { |
739 | @@ -328,16 +250,14 @@ | |||
740 | 328 | var locale = Qt.locale("hu_HU"); | 250 | var locale = Qt.locale("hu_HU"); |
741 | 329 | picker.minimum = new Date(2012, 11, 1); | 251 | picker.minimum = new Date(2012, 11, 1); |
742 | 330 | picker.date = new Date(2012, 11, 1); | 252 | picker.date = new Date(2012, 11, 1); |
743 | 331 | wait(500) | ||
744 | 332 | picker.locale = Qt.locale("hu_HU"); | 253 | picker.locale = Qt.locale("hu_HU"); |
746 | 333 | wait(500) | 254 | waitPickerMoving(); |
747 | 334 | var label = getPickerLabel(picker, "PickerRow_MonthPicker"); | 255 | var label = getPickerLabel(picker, "PickerRow_MonthPicker"); |
748 | 335 | compare(label.text, locale.monthName(picker.date.getMonth(), Locale.LongFormat), "locale for month wrong"); | 256 | compare(label.text, locale.monthName(picker.date.getMonth(), Locale.LongFormat), "locale for month wrong"); |
749 | 336 | 257 | ||
750 | 337 | label = getPickerLabel(picker, "PickerRow_DayPicker"); | 258 | label = getPickerLabel(picker, "PickerRow_DayPicker"); |
751 | 338 | var dayModel = getPickerModel(picker, "PickerRow_DayPicker"); | 259 | var dayModel = getPickerModel(picker, "PickerRow_DayPicker"); |
752 | 339 | compare(label.text, dayModel.text(picker.date.getDate() - 1, testSuite.width), "locale for day name wrong"); | 260 | compare(label.text, dayModel.text(picker.date.getDate() - 1, testSuite.width), "locale for day name wrong"); |
753 | 340 | picker.locale = prevLocale; | ||
754 | 341 | } | 261 | } |
755 | 342 | 262 | ||
756 | 343 | function test_1_changeMinimumBeforeDate() { | 263 | function test_1_changeMinimumBeforeDate() { |
757 | @@ -346,7 +266,8 @@ | |||
758 | 346 | date.setFullYear(date.getFullYear() - 1); | 266 | date.setFullYear(date.getFullYear() - 1); |
759 | 347 | date.setDate(1); | 267 | date.setDate(1); |
760 | 348 | picker.minimum = date; | 268 | picker.minimum = date; |
762 | 349 | wait(500); | 269 | // no rendering is expected, so no need to wait |
763 | 270 | |||
764 | 350 | var year = getPickerLabel(picker, "PickerRow_YearPicker"); | 271 | var year = getPickerLabel(picker, "PickerRow_YearPicker"); |
765 | 351 | compare(year.text, originalDate.getFullYear().toString(), "year differs"); | 272 | compare(year.text, originalDate.getFullYear().toString(), "year differs"); |
766 | 352 | var month = getPickerLabel(picker, "PickerRow_MonthPicker"); | 273 | var month = getPickerLabel(picker, "PickerRow_MonthPicker"); |
767 | @@ -362,7 +283,7 @@ | |||
768 | 362 | date.setFullYear(date.getFullYear() + 1); | 283 | date.setFullYear(date.getFullYear() + 1); |
769 | 363 | date.setDate(1); | 284 | date.setDate(1); |
770 | 364 | picker.maximum = date; | 285 | picker.maximum = date; |
772 | 365 | wait(500); | 286 | waitPickerMoving(); |
773 | 366 | var year = getPickerLabel(picker, "PickerRow_YearPicker"); | 287 | var year = getPickerLabel(picker, "PickerRow_YearPicker"); |
774 | 367 | compare(year.text, originalDate.getFullYear().toString(), "year differs"); | 288 | compare(year.text, originalDate.getFullYear().toString(), "year differs"); |
775 | 368 | var month = getPickerLabel(picker, "PickerRow_MonthPicker"); | 289 | var month = getPickerLabel(picker, "PickerRow_MonthPicker"); |
776 | @@ -375,26 +296,27 @@ | |||
777 | 375 | // make infinite | 296 | // make infinite |
778 | 376 | function test_1_changeMinimumInvalid() { | 297 | function test_1_changeMinimumInvalid() { |
779 | 377 | picker.minimum = Date.prototype.getInvalidDate.call(); | 298 | picker.minimum = Date.prototype.getInvalidDate.call(); |
780 | 299 | // no rendering is expected | ||
781 | 378 | compare(picker.minimum, picker.date, "invalid minimum hasn't been adjusted to date"); | 300 | compare(picker.minimum, picker.date, "invalid minimum hasn't been adjusted to date"); |
782 | 379 | } | 301 | } |
783 | 380 | 302 | ||
784 | 381 | // make infinite | 303 | // make infinite |
785 | 382 | function test_1_changeMaximumInvalid() { | 304 | function test_1_changeMaximumInvalid() { |
786 | 383 | picker.maximum = Date.prototype.getInvalidDate.call(); | 305 | picker.maximum = Date.prototype.getInvalidDate.call(); |
788 | 384 | 306 | waitPickerMoving(); | |
789 | 385 | // check if the year picker model is autoExtending | 307 | // check if the year picker model is autoExtending |
790 | 386 | var yearModel = getPickerModel(picker, "PickerRow_YearPicker"); | 308 | var yearModel = getPickerModel(picker, "PickerRow_YearPicker"); |
791 | 387 | compare(yearModel.autoExtend, true, "the year picker is not auto-extending one"); | 309 | compare(yearModel.autoExtend, true, "the year picker is not auto-extending one"); |
792 | 388 | } | 310 | } |
793 | 389 | 311 | ||
794 | 390 | function test_1_changeDate() { | 312 | function test_1_changeDate() { |
797 | 391 | var date = picker.date; | 313 | var date = new Date(); |
798 | 392 | date.setFullYear(date.getFullYear() + 2); | 314 | date.setFullYear(picker.date.getFullYear() + 2); |
799 | 393 | date.setMonth(5); | 315 | date.setMonth(5); |
800 | 394 | date.setDate(21); | 316 | date.setDate(21); |
801 | 395 | picker.date = date; | 317 | picker.date = date; |
802 | 396 | picker.mode = "Years|Months|Days"; | 318 | picker.mode = "Years|Months|Days"; |
804 | 397 | wait(500); | 319 | waitPickerMoving(); |
805 | 398 | 320 | ||
806 | 399 | var yearLabel = getPickerLabel(picker, "PickerRow_YearPicker"); | 321 | var yearLabel = getPickerLabel(picker, "PickerRow_YearPicker"); |
807 | 400 | var monthLabel = getPickerLabel(picker, "PickerRow_MonthPicker"); | 322 | var monthLabel = getPickerLabel(picker, "PickerRow_MonthPicker"); |
808 | @@ -410,15 +332,15 @@ | |||
809 | 410 | picker.minimum = new Date(2013, 9, 1); | 332 | picker.minimum = new Date(2013, 9, 1); |
810 | 411 | picker.date = new Date(2013, 09, 31); | 333 | picker.date = new Date(2013, 09, 31); |
811 | 412 | picker.locale = Qt.locale("hu_HU") | 334 | picker.locale = Qt.locale("hu_HU") |
813 | 413 | wait(500); | 335 | waitPickerMoving(); |
814 | 414 | 336 | ||
815 | 415 | // click on the month picker to set the next month | 337 | // click on the month picker to set the next month |
816 | 416 | var monthPicker = findChild(picker, "PickerRow_MonthPicker"); | 338 | var monthPicker = findChild(picker, "PickerRow_MonthPicker"); |
817 | 417 | var monthCurrent = findChild(monthPicker, "Picker_ViewLoader"); | 339 | var monthCurrent = findChild(monthPicker, "Picker_ViewLoader"); |
818 | 418 | var my = monthPicker.y + (monthPicker.height / 2) + monthCurrent.item.currentItem.height; | 340 | var my = monthPicker.y + (monthPicker.height / 2) + monthCurrent.item.currentItem.height; |
819 | 419 | var mx = monthPicker.x + monthPicker.width / 2; | 341 | var mx = monthPicker.x + monthPicker.width / 2; |
822 | 420 | mouseClick(testSuite, mx, my); | 342 | mouseClick(picker, mx, my); |
823 | 421 | wait(500); | 343 | waitPickerMoving(); |
824 | 422 | 344 | ||
825 | 423 | var yearLabel = getPickerLabel(picker, "PickerRow_YearPicker"); | 345 | var yearLabel = getPickerLabel(picker, "PickerRow_YearPicker"); |
826 | 424 | var monthLabel = getPickerLabel(picker, "PickerRow_MonthPicker"); | 346 | var monthLabel = getPickerLabel(picker, "PickerRow_MonthPicker"); |
827 | @@ -433,8 +355,8 @@ | |||
828 | 433 | 355 | ||
829 | 434 | // set it back | 356 | // set it back |
830 | 435 | my = monthPicker.y + (monthPicker.height / 2) - monthCurrent.item.currentItem.height; | 357 | my = monthPicker.y + (monthPicker.height / 2) - monthCurrent.item.currentItem.height; |
833 | 436 | mouseClick(testSuite, mx, my); | 358 | mouseClick(picker, mx, my); |
834 | 437 | wait(500); | 359 | waitPickerMoving(); |
835 | 438 | 360 | ||
836 | 439 | compare(yearLabel.text, "2013", "different year value"); | 361 | compare(yearLabel.text, "2013", "different year value"); |
837 | 440 | // October | 362 | // October |
838 | @@ -451,8 +373,9 @@ | |||
839 | 451 | var maxDate = new Date(2013, 11, 31); | 373 | var maxDate = new Date(2013, 11, 31); |
840 | 452 | picker.minimum = minDate; | 374 | picker.minimum = minDate; |
841 | 453 | picker.maximum = maxDate; | 375 | picker.maximum = maxDate; |
843 | 454 | wait(500); | 376 | waitPickerMoving(); |
844 | 455 | picker.date = date; | 377 | picker.date = date; |
845 | 378 | waitPickerMoving(); | ||
846 | 456 | 379 | ||
847 | 457 | var yearPicker = findChild(picker, "PickerRow_YearPicker"); | 380 | var yearPicker = findChild(picker, "PickerRow_YearPicker"); |
848 | 458 | compare(yearPicker.enabled, false, "year picker should be disabled"); | 381 | compare(yearPicker.enabled, false, "year picker should be disabled"); |
849 | @@ -465,6 +388,7 @@ | |||
850 | 465 | picker.minimum = minDate; | 388 | picker.minimum = minDate; |
851 | 466 | picker.maximum = maxDate; | 389 | picker.maximum = maxDate; |
852 | 467 | picker.date = date; | 390 | picker.date = date; |
853 | 391 | waitPickerMoving(); | ||
854 | 468 | 392 | ||
855 | 469 | var yearPicker = findChild(picker, "PickerRow_YearPicker"); | 393 | var yearPicker = findChild(picker, "PickerRow_YearPicker"); |
856 | 470 | compare(yearPicker.enabled, false, "year picker should be disabled"); | 394 | compare(yearPicker.enabled, false, "year picker should be disabled"); |
857 | @@ -491,10 +415,11 @@ | |||
858 | 491 | 415 | ||
859 | 492 | function test_3_changeHours() { | 416 | function test_3_changeHours() { |
860 | 493 | picker.mode = "Hours|Minutes|Seconds"; | 417 | picker.mode = "Hours|Minutes|Seconds"; |
861 | 418 | waitPickerMoving(); | ||
862 | 494 | var date = new Date(picker.date); | 419 | var date = new Date(picker.date); |
863 | 495 | date.setHours((date.getHours() + 10) % 24); | 420 | date.setHours((date.getHours() + 10) % 24); |
864 | 496 | picker.date = date; | 421 | picker.date = date; |
866 | 497 | wait(500); | 422 | waitPickerMoving(); |
867 | 498 | 423 | ||
868 | 499 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); | 424 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); |
869 | 500 | verify(hoursLabel, "hour label undefined"); | 425 | verify(hoursLabel, "hour label undefined"); |
870 | @@ -512,7 +437,7 @@ | |||
871 | 512 | var date = new Date(picker.date); | 437 | var date = new Date(picker.date); |
872 | 513 | date.setMinutes((date.getMinutes() + 40) % 60); | 438 | date.setMinutes((date.getMinutes() + 40) % 60); |
873 | 514 | picker.date = date; | 439 | picker.date = date; |
875 | 515 | wait(500); | 440 | waitPickerMoving(); |
876 | 516 | 441 | ||
877 | 517 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); | 442 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); |
878 | 518 | verify(hoursLabel, "hour label undefined"); | 443 | verify(hoursLabel, "hour label undefined"); |
879 | @@ -530,7 +455,7 @@ | |||
880 | 530 | var date = new Date(picker.date); | 455 | var date = new Date(picker.date); |
881 | 531 | date.setSeconds((date.getSeconds() + 50) % 60); | 456 | date.setSeconds((date.getSeconds() + 50) % 60); |
882 | 532 | picker.date = date; | 457 | picker.date = date; |
884 | 533 | wait(500); | 458 | waitPickerMoving(); |
885 | 534 | 459 | ||
886 | 535 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); | 460 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); |
887 | 536 | verify(hoursLabel, "hour label undefined"); | 461 | verify(hoursLabel, "hour label undefined"); |
888 | @@ -550,7 +475,7 @@ | |||
889 | 550 | date.setFullYear(date.getFullYear() - 1); | 475 | date.setFullYear(date.getFullYear() - 1); |
890 | 551 | date.setDate(1); | 476 | date.setDate(1); |
891 | 552 | picker.minimum = date; | 477 | picker.minimum = date; |
893 | 553 | wait(500); | 478 | waitPickerMoving(); |
894 | 554 | 479 | ||
895 | 555 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); | 480 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); |
896 | 556 | verify(hoursLabel, "hour label undefined"); | 481 | verify(hoursLabel, "hour label undefined"); |
897 | @@ -570,7 +495,7 @@ | |||
898 | 570 | date.setFullYear(date.getFullYear() + 1); | 495 | date.setFullYear(date.getFullYear() + 1); |
899 | 571 | date.setDate(1); | 496 | date.setDate(1); |
900 | 572 | picker.maximum = date; | 497 | picker.maximum = date; |
902 | 573 | wait(500); | 498 | waitPickerMoving(); |
903 | 574 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); | 499 | var hoursLabel = getPickerLabel(picker, "PickerRow_HoursPicker"); |
904 | 575 | verify(hoursLabel, "hour label undefined"); | 500 | verify(hoursLabel, "hour label undefined"); |
905 | 576 | compare(hoursLabel.text, ("00" + originalDate.getHours()).slice(-2), "hours differ"); | 501 | compare(hoursLabel.text, ("00" + originalDate.getHours()).slice(-2), "hours differ"); |
906 | @@ -583,12 +508,13 @@ | |||
907 | 583 | } | 508 | } |
908 | 584 | 509 | ||
909 | 585 | function test_4_disabledHour() { | 510 | function test_4_disabledHour() { |
910 | 511 | picker.mode = "Hours|Minutes|Seconds"; | ||
911 | 586 | var date = setHMS(new Date(), 12, 10, 45); | 512 | var date = setHMS(new Date(), 12, 10, 45); |
912 | 587 | var minDate = setHMS(new Date(), 12, 0, 0); | 513 | var minDate = setHMS(new Date(), 12, 0, 0); |
913 | 588 | var maxDate = setHMS(new Date(), 12, 59, 59); | 514 | var maxDate = setHMS(new Date(), 12, 59, 59); |
914 | 589 | picker.minimum = minDate; | 515 | picker.minimum = minDate; |
915 | 590 | picker.maximum = maxDate; | 516 | picker.maximum = maxDate; |
917 | 591 | wait(500); | 517 | waitPickerMoving(); |
918 | 592 | picker.date = date; | 518 | picker.date = date; |
919 | 593 | 519 | ||
920 | 594 | var hoursPicker = findChild(picker, "PickerRow_HoursPicker"); | 520 | var hoursPicker = findChild(picker, "PickerRow_HoursPicker"); |
921 | @@ -596,13 +522,14 @@ | |||
922 | 596 | } | 522 | } |
923 | 597 | 523 | ||
924 | 598 | function test_4_disabledHoursAndMinutes() { | 524 | function test_4_disabledHoursAndMinutes() { |
925 | 525 | picker.mode = "Hours|Minutes|Seconds"; | ||
926 | 599 | var date = setHMS(new Date(), 12, 10, 45); | 526 | var date = setHMS(new Date(), 12, 10, 45); |
927 | 600 | var minDate = setHMS(new Date(), 12, 10, 0); | 527 | var minDate = setHMS(new Date(), 12, 10, 0); |
928 | 601 | var maxDate = setHMS(new Date(), 12, 10, 59); | 528 | var maxDate = setHMS(new Date(), 12, 10, 59); |
929 | 602 | picker.minimum = minDate; | 529 | picker.minimum = minDate; |
930 | 603 | picker.maximum = maxDate; | 530 | picker.maximum = maxDate; |
931 | 604 | picker.date = date; | 531 | picker.date = date; |
933 | 605 | wait(500); | 532 | waitPickerMoving(); |
934 | 606 | 533 | ||
935 | 607 | var hoursPicker = findChild(picker, "PickerRow_HoursPicker"); | 534 | var hoursPicker = findChild(picker, "PickerRow_HoursPicker"); |
936 | 608 | compare(hoursPicker.enabled, false, "hours picker should be disabled"); | 535 | compare(hoursPicker.enabled, false, "hours picker should be disabled"); |
937 | @@ -611,13 +538,14 @@ | |||
938 | 611 | } | 538 | } |
939 | 612 | 539 | ||
940 | 613 | function test_4_linearSecondsPicker() { | 540 | function test_4_linearSecondsPicker() { |
941 | 541 | picker.mode = "Hours|Minutes|Seconds"; | ||
942 | 614 | var date = setHMS(new Date(), 12, 10, 45); | 542 | var date = setHMS(new Date(), 12, 10, 45); |
943 | 615 | var minDate = setHMS(new Date(), 12, 10, 1); | 543 | var minDate = setHMS(new Date(), 12, 10, 1); |
944 | 616 | var maxDate = setHMS(new Date(), 12, 10, 59); | 544 | var maxDate = setHMS(new Date(), 12, 10, 59); |
945 | 617 | picker.minimum = minDate; | 545 | picker.minimum = minDate; |
946 | 618 | picker.maximum = maxDate; | 546 | picker.maximum = maxDate; |
947 | 619 | picker.date = date; | 547 | picker.date = date; |
949 | 620 | wait(500); | 548 | waitPickerMoving(); |
950 | 621 | 549 | ||
951 | 622 | var hoursPicker = findChild(picker, "PickerRow_HoursPicker"); | 550 | var hoursPicker = findChild(picker, "PickerRow_HoursPicker"); |
952 | 623 | compare(hoursPicker.enabled, false, "hours picker should be disabled"); | 551 | compare(hoursPicker.enabled, false, "hours picker should be disabled"); |
PASSED: Continuous integration, rev:970 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- ci/1840/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty/ 3708 jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty- touch/3299 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- trusty- amd64-ci/ 788 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- trusty- armhf-ci/ 788 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- trusty- armhf-ci/ 788/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-trusty/ 3258 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/3713 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/3713/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/3301 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/3301/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- mako/5669 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 4520
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- ui-toolkit- ci/1840/ rebuild
http://