Merge lp:~unity-team/unity/phablet.test_Panel-searchIndicator into lp:unity/phablet
- phablet.test_Panel-searchIndicator
- Merge into phablet
Proposed by
Andrea Cimitan
Status: | Superseded |
---|---|
Proposed branch: | lp:~unity-team/unity/phablet.test_Panel-searchIndicator |
Merge into: | lp:unity/phablet |
Diff against target: |
2052 lines (+770/-698) 32 files modified
Panel/SearchIndicator.qml (+1/-0) tests/qmluitests/CMakeLists.txt (+5/-14) tests/qmluitests/Components/CMakeLists.txt (+7/-0) tests/qmluitests/Components/RevealingRectangle.qml (+1/-1) tests/qmluitests/Components/tst_DraggingArea.qml (+80/-80) tests/qmluitests/Components/tst_FilterGrid.qml (+82/-85) tests/qmluitests/Components/tst_ResponsiveGridView.qml (+74/-73) tests/qmluitests/Components/tst_Revealer.qml (+30/-29) tests/qmluitests/Components/tst_Showable.qml (+72/-71) tests/qmluitests/Components/tst_Stage.qml (+143/-142) tests/qmluitests/Components/tst_Tile.qml (+4/-3) tests/qmluitests/Dash/CMakeLists.txt (+1/-0) tests/qmluitests/Dash/tst_DashPreview.qml (+3/-2) tests/qmluitests/Greeter/CMakeLists.txt (+1/-0) tests/qmluitests/Greeter/tst_Greeter.qml (+7/-5) tests/qmluitests/Hud/CMakeLists.txt (+3/-0) tests/qmluitests/Hud/qml/HudClient/CMakeLists.txt (+2/-2) tests/qmluitests/Hud/qml/HudClient/fake_hud_plugin.cpp (+2/-2) tests/qmluitests/Hud/tst_Hud.qml (+6/-6) tests/qmluitests/Launcher/CMakeLists.txt (+1/-0) tests/qmluitests/Launcher/tst_Launcher.qml (+32/-34) tests/qmluitests/Panel/CMakeLists.txt (+2/-0) tests/qmluitests/Panel/tst_IndicatorRow.qml (+23/-23) tests/qmluitests/Panel/tst_SearchIndicator.qml (+63/-0) tests/unittests/CMakeLists.txt (+1/-6) tests/unittests/Components/CMakeLists.txt (+6/-0) tests/unittests/Components/tst_AnimationControllerWithSignals.qml (+96/-97) tests/unittests/Components/tst_Carousel.qml (+1/-1) tests/unittests/Components/tst_CrossFadeImage.qml (+18/-19) tests/unittests/Components/tst_MathLocal.qml (+1/-1) tests/unittests/Components/tst_RatingStars.qml (+1/-1) tests/unittests/Components/tst_TimeLocal.qml (+1/-1) |
To merge this branch: | bzr merge lp:~unity-team/unity/phablet.test_Panel-searchIndicator |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Unity Team | Pending | ||
Review via email: mp+157679@code.launchpad.net |
Commit message
Add test for SearchIndicator under qmluitests/Panel
Description of the change
Add test for SearchIndicator under qmluitests/Panel
To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Needs Fixing
(continuous-integration)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Panel/SearchIndicator.qml' | |||
2 | --- Panel/SearchIndicator.qml 2013-03-26 15:45:37 +0000 | |||
3 | +++ Panel/SearchIndicator.qml 2013-04-09 10:00:31 +0000 | |||
4 | @@ -43,6 +43,7 @@ | |||
5 | 43 | 43 | ||
6 | 44 | Item { | 44 | Item { |
7 | 45 | id: container | 45 | id: container |
8 | 46 | objectName: "container" | ||
9 | 46 | 47 | ||
10 | 47 | width: parent.width | 48 | width: parent.width |
11 | 48 | height: parent.height | 49 | height: parent.height |
12 | 49 | 50 | ||
13 | === modified file 'tests/qmluitests/CMakeLists.txt' | |||
14 | --- tests/qmluitests/CMakeLists.txt 2013-04-08 11:52:36 +0000 | |||
15 | +++ tests/qmluitests/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
16 | @@ -1,19 +1,10 @@ | |||
17 | 1 | add_subdirectory(qml) | ||
18 | 2 | |||
19 | 3 | add_custom_target(qmluitests) | 1 | add_custom_target(qmluitests) |
20 | 4 | 2 | ||
21 | 5 | set(qmltest_DEFAULT_TARGETS qmluitests alltests) | 3 | set(qmltest_DEFAULT_TARGETS qmluitests alltests) |
22 | 6 | set(qmltest_DEFAULT_NO_ADD_TEST TRUE) | 4 | set(qmltest_DEFAULT_NO_ADD_TEST TRUE) |
23 | 7 | 5 | ||
36 | 8 | add_qml_test(DashPreview) | 6 | add_subdirectory(Components) |
37 | 9 | add_qml_test(DraggingArea) | 7 | add_subdirectory(Dash) |
38 | 10 | add_qml_test(FilterGrid IMPORT_PATH ${CMAKE_BINARY_DIR}/plugins) | 8 | add_subdirectory(Greeter) |
39 | 11 | add_qml_test(Greeter) | 9 | add_subdirectory(Hud) |
40 | 12 | add_qml_test(Hud IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/qml) | 10 | add_subdirectory(Panel) |
29 | 13 | add_qml_test(IndicatorRow IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/qml) | ||
30 | 14 | add_qml_test(Launcher) | ||
31 | 15 | add_qml_test(ResponsiveGridView) | ||
32 | 16 | add_qml_test(Revealer) | ||
33 | 17 | add_qml_test(Showable) | ||
34 | 18 | add_qml_test(Stage) | ||
35 | 19 | add_qml_test(Tile) | ||
41 | 20 | 11 | ||
42 | === added directory 'tests/qmluitests/Components' | |||
43 | === added file 'tests/qmluitests/Components/CMakeLists.txt' | |||
44 | --- tests/qmluitests/Components/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
45 | +++ tests/qmluitests/Components/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
46 | @@ -0,0 +1,7 @@ | |||
47 | 1 | add_qml_test(DraggingArea) | ||
48 | 2 | add_qml_test(FilterGrid IMPORT_PATH ${CMAKE_BINARY_DIR}/plugins) | ||
49 | 3 | add_qml_test(ResponsiveGridView) | ||
50 | 4 | add_qml_test(Revealer) | ||
51 | 5 | add_qml_test(Showable) | ||
52 | 6 | add_qml_test(Stage) | ||
53 | 7 | add_qml_test(Tile) | ||
54 | 0 | 8 | ||
55 | === renamed file 'tests/qmluitests/RevealingRectangle.qml' => 'tests/qmluitests/Components/RevealingRectangle.qml' | |||
56 | --- tests/qmluitests/RevealingRectangle.qml 2013-03-19 12:06:15 +0000 | |||
57 | +++ tests/qmluitests/Components/RevealingRectangle.qml 2013-04-09 10:00:31 +0000 | |||
58 | @@ -16,7 +16,7 @@ | |||
59 | 16 | 16 | ||
60 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
61 | 18 | import Ubuntu.Components 0.1 | 18 | import Ubuntu.Components 0.1 |
63 | 19 | import "../../Components" | 19 | import "../../../Components" |
64 | 20 | 20 | ||
65 | 21 | Item { | 21 | Item { |
66 | 22 | id: revealingRectangle | 22 | id: revealingRectangle |
67 | 23 | 23 | ||
68 | === renamed file 'tests/qmluitests/tst_DraggingArea.qml' => 'tests/qmluitests/Components/tst_DraggingArea.qml' | |||
69 | --- tests/qmluitests/tst_DraggingArea.qml 2013-03-15 15:34:06 +0000 | |||
70 | +++ tests/qmluitests/Components/tst_DraggingArea.qml 2013-04-09 10:00:31 +0000 | |||
71 | @@ -16,7 +16,7 @@ | |||
72 | 16 | 16 | ||
73 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
74 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
76 | 19 | import "../../Components" | 19 | import "../../../Components" |
77 | 20 | 20 | ||
78 | 21 | /* | 21 | /* |
79 | 22 | There will be a green rectangle in the center of the | 22 | There will be a green rectangle in the center of the |
80 | @@ -35,6 +35,85 @@ | |||
81 | 35 | property int dragStartCount: 0 | 35 | property int dragStartCount: 0 |
82 | 36 | property int dragEndCount: 0 | 36 | property int dragEndCount: 0 |
83 | 37 | 37 | ||
84 | 38 | TestCase { | ||
85 | 39 | name: "DraggingAreaTest" | ||
86 | 40 | when: windowShown | ||
87 | 41 | |||
88 | 42 | function test_horizontalDrag() { | ||
89 | 43 | draggingArea.orientation = Qt.Horizontal; | ||
90 | 44 | |||
91 | 45 | dragStartCount = 0 | ||
92 | 46 | dragEndCount = 0 | ||
93 | 47 | |||
94 | 48 | compare(draggingArea.dragging, false); | ||
95 | 49 | |||
96 | 50 | // (item, x, y, button, modifiers, delay) | ||
97 | 51 | mousePress(draggingArea, | ||
98 | 52 | 25, 25, | ||
99 | 53 | Qt.LeftButton, Qt.NoModifier, 0); | ||
100 | 54 | |||
101 | 55 | compare(draggingArea.dragging, false); | ||
102 | 56 | compare(dragStartCount, 0); | ||
103 | 57 | compare(dragEndCount, 0); | ||
104 | 58 | |||
105 | 59 | // (item, x, y, delay, button) | ||
106 | 60 | mouseMove(draggingArea, | ||
107 | 61 | -100, 25, | ||
108 | 62 | 0, Qt.LeftButton); | ||
109 | 63 | |||
110 | 64 | compare(draggingArea.dragging, true); | ||
111 | 65 | compare(draggingArea.dragValue, -125); | ||
112 | 66 | compare(dragStartCount, 1); | ||
113 | 67 | compare(dragEndCount, 0); | ||
114 | 68 | |||
115 | 69 | // (item, x, y, button, modifiers, delay) | ||
116 | 70 | mouseRelease(draggingArea, | ||
117 | 71 | -100, 25, | ||
118 | 72 | Qt.LeftButton, Qt.NoModifier, 0); | ||
119 | 73 | |||
120 | 74 | compare(draggingArea.dragging, false); | ||
121 | 75 | compare(dragStartCount, 1); | ||
122 | 76 | compare(dragEndCount, 1); | ||
123 | 77 | } | ||
124 | 78 | |||
125 | 79 | function test_verticalDrag() { | ||
126 | 80 | draggingArea.orientation = Qt.Vertical; | ||
127 | 81 | |||
128 | 82 | dragStartCount = 0 | ||
129 | 83 | dragEndCount = 0 | ||
130 | 84 | |||
131 | 85 | compare(draggingArea.dragging, false); | ||
132 | 86 | |||
133 | 87 | // (item, x, y, button, modifiers, delay) | ||
134 | 88 | mousePress(draggingArea, | ||
135 | 89 | 25, 25, | ||
136 | 90 | Qt.LeftButton, Qt.NoModifier, 0); | ||
137 | 91 | |||
138 | 92 | compare(draggingArea.dragging, false); | ||
139 | 93 | compare(dragStartCount, 0); | ||
140 | 94 | compare(dragEndCount, 0); | ||
141 | 95 | |||
142 | 96 | // (item, x, y, delay, button) | ||
143 | 97 | mouseMove(draggingArea, | ||
144 | 98 | 25, 125, | ||
145 | 99 | 0, Qt.LeftButton); | ||
146 | 100 | |||
147 | 101 | compare(draggingArea.dragging, true); | ||
148 | 102 | compare(draggingArea.dragValue, 100); | ||
149 | 103 | compare(dragStartCount, 1); | ||
150 | 104 | compare(dragEndCount, 0); | ||
151 | 105 | |||
152 | 106 | // (item, x, y, button, modifiers, delay) | ||
153 | 107 | mouseRelease(draggingArea, | ||
154 | 108 | 25, 125, | ||
155 | 109 | Qt.LeftButton, Qt.NoModifier, 0); | ||
156 | 110 | |||
157 | 111 | compare(draggingArea.dragging, false); | ||
158 | 112 | compare(dragStartCount, 1); | ||
159 | 113 | compare(dragEndCount, 1); | ||
160 | 114 | } | ||
161 | 115 | } | ||
162 | 116 | |||
163 | 38 | Column { | 117 | Column { |
164 | 39 | anchors.left: parent.left | 118 | anchors.left: parent.left |
165 | 40 | anchors.top: parent.top | 119 | anchors.top: parent.top |
166 | @@ -102,83 +181,4 @@ | |||
167 | 102 | onDragEnd : { ++root.dragEndCount } | 181 | onDragEnd : { ++root.dragEndCount } |
168 | 103 | } | 182 | } |
169 | 104 | } | 183 | } |
170 | 105 | |||
171 | 106 | TestCase { | ||
172 | 107 | name: "DraggingArea" | ||
173 | 108 | when: windowShown | ||
174 | 109 | |||
175 | 110 | function test_horizontalDrag() { | ||
176 | 111 | draggingArea.orientation = Qt.Horizontal; | ||
177 | 112 | |||
178 | 113 | dragStartCount = 0 | ||
179 | 114 | dragEndCount = 0 | ||
180 | 115 | |||
181 | 116 | compare(draggingArea.dragging, false); | ||
182 | 117 | |||
183 | 118 | // (item, x, y, button, modifiers, delay) | ||
184 | 119 | mousePress(draggingArea, | ||
185 | 120 | 25, 25, | ||
186 | 121 | Qt.LeftButton, Qt.NoModifier, 0); | ||
187 | 122 | |||
188 | 123 | compare(draggingArea.dragging, false); | ||
189 | 124 | compare(dragStartCount, 0); | ||
190 | 125 | compare(dragEndCount, 0); | ||
191 | 126 | |||
192 | 127 | // (item, x, y, delay, button) | ||
193 | 128 | mouseMove(draggingArea, | ||
194 | 129 | -100, 25, | ||
195 | 130 | 0, Qt.LeftButton); | ||
196 | 131 | |||
197 | 132 | compare(draggingArea.dragging, true); | ||
198 | 133 | compare(draggingArea.dragValue, -125); | ||
199 | 134 | compare(dragStartCount, 1); | ||
200 | 135 | compare(dragEndCount, 0); | ||
201 | 136 | |||
202 | 137 | // (item, x, y, button, modifiers, delay) | ||
203 | 138 | mouseRelease(draggingArea, | ||
204 | 139 | -100, 25, | ||
205 | 140 | Qt.LeftButton, Qt.NoModifier, 0); | ||
206 | 141 | |||
207 | 142 | compare(draggingArea.dragging, false); | ||
208 | 143 | compare(dragStartCount, 1); | ||
209 | 144 | compare(dragEndCount, 1); | ||
210 | 145 | } | ||
211 | 146 | |||
212 | 147 | function test_verticalDrag() { | ||
213 | 148 | draggingArea.orientation = Qt.Vertical; | ||
214 | 149 | |||
215 | 150 | dragStartCount = 0 | ||
216 | 151 | dragEndCount = 0 | ||
217 | 152 | |||
218 | 153 | compare(draggingArea.dragging, false); | ||
219 | 154 | |||
220 | 155 | // (item, x, y, button, modifiers, delay) | ||
221 | 156 | mousePress(draggingArea, | ||
222 | 157 | 25, 25, | ||
223 | 158 | Qt.LeftButton, Qt.NoModifier, 0); | ||
224 | 159 | |||
225 | 160 | compare(draggingArea.dragging, false); | ||
226 | 161 | compare(dragStartCount, 0); | ||
227 | 162 | compare(dragEndCount, 0); | ||
228 | 163 | |||
229 | 164 | // (item, x, y, delay, button) | ||
230 | 165 | mouseMove(draggingArea, | ||
231 | 166 | 25, 125, | ||
232 | 167 | 0, Qt.LeftButton); | ||
233 | 168 | |||
234 | 169 | compare(draggingArea.dragging, true); | ||
235 | 170 | compare(draggingArea.dragValue, 100); | ||
236 | 171 | compare(dragStartCount, 1); | ||
237 | 172 | compare(dragEndCount, 0); | ||
238 | 173 | |||
239 | 174 | // (item, x, y, button, modifiers, delay) | ||
240 | 175 | mouseRelease(draggingArea, | ||
241 | 176 | 25, 125, | ||
242 | 177 | Qt.LeftButton, Qt.NoModifier, 0); | ||
243 | 178 | |||
244 | 179 | compare(draggingArea.dragging, false); | ||
245 | 180 | compare(dragStartCount, 1); | ||
246 | 181 | compare(dragEndCount, 1); | ||
247 | 182 | } | ||
248 | 183 | } | ||
249 | 184 | } | 184 | } |
250 | 185 | 185 | ||
251 | === renamed file 'tests/qmluitests/tst_FilterGrid.qml' => 'tests/qmluitests/Components/tst_FilterGrid.qml' | |||
252 | --- tests/qmluitests/tst_FilterGrid.qml 2013-03-18 15:49:03 +0000 | |||
253 | +++ tests/qmluitests/Components/tst_FilterGrid.qml 2013-04-09 10:00:31 +0000 | |||
254 | @@ -16,7 +16,7 @@ | |||
255 | 16 | 16 | ||
256 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
257 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
259 | 19 | import "../../Components" | 19 | import "../../../Components" |
260 | 20 | import Ubuntu.Components.ListItems 0.1 as ListItem | 20 | import Ubuntu.Components.ListItems 0.1 as ListItem |
261 | 21 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 0.1 |
262 | 22 | 22 | ||
263 | @@ -30,6 +30,87 @@ | |||
264 | 30 | height: units.gu(50) | 30 | height: units.gu(50) |
265 | 31 | color: "white" | 31 | color: "white" |
266 | 32 | 32 | ||
267 | 33 | TestCase { | ||
268 | 34 | name: "FilterGridTest" | ||
269 | 35 | when: windowShown | ||
270 | 36 | |||
271 | 37 | function test_turningFilterOffShowsAllElements() { | ||
272 | 38 | compare(countVisibleDelegates(), 6) | ||
273 | 39 | |||
274 | 40 | filterCheckBox.checked = false | ||
275 | 41 | |||
276 | 42 | // wait for animations to complete | ||
277 | 43 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
278 | 44 | compare(countVisibleDelegates(), 12) | ||
279 | 45 | |||
280 | 46 | // back to initial state | ||
281 | 47 | filterCheckBox.checked = true | ||
282 | 48 | // wait for animations to complete | ||
283 | 49 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
284 | 50 | } | ||
285 | 51 | |||
286 | 52 | function test_collapsedRowCount() { | ||
287 | 53 | for (var i = 0; i < 4; ++i) { | ||
288 | 54 | collapsedRowCountSelector.selectedIndex = i | ||
289 | 55 | // wait for animations to complete | ||
290 | 56 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
291 | 57 | // We have 3 elements per row. | ||
292 | 58 | // row count == index + 1 | ||
293 | 59 | compare(countVisibleDelegates(), 3*(i+1)) | ||
294 | 60 | } | ||
295 | 61 | |||
296 | 62 | // back to initial state | ||
297 | 63 | collapsedRowCountSelector.selectedIndex = 1 | ||
298 | 64 | // wait for animations to complete | ||
299 | 65 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
300 | 66 | } | ||
301 | 67 | |||
302 | 68 | // Checks that the filter toggle button, the one that says "View All (xy)", | ||
303 | 69 | // shows up only when it's possible for the grid to be expanded. | ||
304 | 70 | function test_filterToggleButton() { | ||
305 | 71 | var filterToggleButton = filterGrid.__filterToggleButton | ||
306 | 72 | |||
307 | 73 | for (var i = 0; i < 4; ++i) { | ||
308 | 74 | collapsedRowCountSelector.selectedIndex = i | ||
309 | 75 | // wait for animations to complete | ||
310 | 76 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
311 | 77 | // row count == index + 1 | ||
312 | 78 | // The total number of rows is 4. | ||
313 | 79 | |||
314 | 80 | expandableCheckBox.checked = false | ||
315 | 81 | compare(filterToggleButton.visible, false) | ||
316 | 82 | expandableCheckBox.checked = true | ||
317 | 83 | |||
318 | 84 | if ((i+1) < 4) | ||
319 | 85 | compare(filterToggleButton.visible, true) | ||
320 | 86 | else | ||
321 | 87 | compare(filterToggleButton.visible, false) | ||
322 | 88 | } | ||
323 | 89 | |||
324 | 90 | // back to initial state | ||
325 | 91 | collapsedRowCountSelector.selectedIndex = 1 | ||
326 | 92 | expandableCheckBox.checked = true | ||
327 | 93 | // wait for animations to complete | ||
328 | 94 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
329 | 95 | } | ||
330 | 96 | |||
331 | 97 | function countVisibleDelegates() { | ||
332 | 98 | return __countVisibleDelegates(filterGrid.visibleChildren, 0) | ||
333 | 99 | } | ||
334 | 100 | |||
335 | 101 | function __countVisibleDelegates(objList, total) { | ||
336 | 102 | for (var i = 0; i < objList.length; ++i) { | ||
337 | 103 | var child = objList[i]; | ||
338 | 104 | if (child.isGridDelegate !== undefined) { | ||
339 | 105 | ++total; | ||
340 | 106 | } else { | ||
341 | 107 | total = __countVisibleDelegates(child.visibleChildren, total) | ||
342 | 108 | } | ||
343 | 109 | } | ||
344 | 110 | return total | ||
345 | 111 | } | ||
346 | 112 | } | ||
347 | 113 | |||
348 | 33 | Column { | 114 | Column { |
349 | 34 | id: controls | 115 | id: controls |
350 | 35 | width: units.gu(30) | 116 | width: units.gu(30) |
351 | @@ -114,89 +195,5 @@ | |||
352 | 114 | } | 195 | } |
353 | 115 | } | 196 | } |
354 | 116 | } | 197 | } |
355 | 117 | |||
356 | 118 | TestCase { | ||
357 | 119 | name: "FilterGrid" | ||
358 | 120 | when: windowShown | ||
359 | 121 | |||
360 | 122 | function test_turningFilterOffShowsAllElements() { | ||
361 | 123 | compare(countVisibleDelegates(), 6) | ||
362 | 124 | |||
363 | 125 | filterCheckBox.checked = false | ||
364 | 126 | |||
365 | 127 | // wait for animations to complete | ||
366 | 128 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
367 | 129 | compare(countVisibleDelegates(), 12) | ||
368 | 130 | |||
369 | 131 | // back to initial state | ||
370 | 132 | filterCheckBox.checked = true | ||
371 | 133 | // wait for animations to complete | ||
372 | 134 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
373 | 135 | } | ||
374 | 136 | |||
375 | 137 | function test_collapsedRowCount() { | ||
376 | 138 | |||
377 | 139 | for (var i = 0; i < 4; ++i) { | ||
378 | 140 | collapsedRowCountSelector.selectedIndex = i | ||
379 | 141 | // wait for animations to complete | ||
380 | 142 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
381 | 143 | // We have 3 elements per row. | ||
382 | 144 | // row count == index + 1 | ||
383 | 145 | compare(countVisibleDelegates(), 3*(i+1)) | ||
384 | 146 | } | ||
385 | 147 | |||
386 | 148 | // back to initial state | ||
387 | 149 | collapsedRowCountSelector.selectedIndex = 1 | ||
388 | 150 | // wait for animations to complete | ||
389 | 151 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
390 | 152 | } | ||
391 | 153 | |||
392 | 154 | // Checks that the filter toggle button, the one that says "View All (xy)", | ||
393 | 155 | // shows up only when it's possible for the grid to be expanded. | ||
394 | 156 | function test_filterToggleButton() { | ||
395 | 157 | |||
396 | 158 | var filterToggleButton = filterGrid.__filterToggleButton | ||
397 | 159 | |||
398 | 160 | for (var i = 0; i < 4; ++i) { | ||
399 | 161 | collapsedRowCountSelector.selectedIndex = i | ||
400 | 162 | // wait for animations to complete | ||
401 | 163 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
402 | 164 | // row count == index + 1 | ||
403 | 165 | // The total number of rows is 4. | ||
404 | 166 | |||
405 | 167 | expandableCheckBox.checked = false | ||
406 | 168 | compare(filterToggleButton.visible, false) | ||
407 | 169 | expandableCheckBox.checked = true | ||
408 | 170 | |||
409 | 171 | if ((i+1) < 4) | ||
410 | 172 | compare(filterToggleButton.visible, true) | ||
411 | 173 | else | ||
412 | 174 | compare(filterToggleButton.visible, false) | ||
413 | 175 | } | ||
414 | 176 | |||
415 | 177 | // back to initial state | ||
416 | 178 | collapsedRowCountSelector.selectedIndex = 1 | ||
417 | 179 | expandableCheckBox.checked = true | ||
418 | 180 | // wait for animations to complete | ||
419 | 181 | tryCompare(filterGrid.__expansionAnimation, "running", false) | ||
420 | 182 | } | ||
421 | 183 | |||
422 | 184 | function countVisibleDelegates() { | ||
423 | 185 | return __countVisibleDelegates(filterGrid.visibleChildren, 0) | ||
424 | 186 | } | ||
425 | 187 | |||
426 | 188 | function __countVisibleDelegates(objList, total) { | ||
427 | 189 | for (var i = 0; i < objList.length; ++i) { | ||
428 | 190 | var child = objList[i]; | ||
429 | 191 | if (child.isGridDelegate !== undefined) { | ||
430 | 192 | ++total; | ||
431 | 193 | } else { | ||
432 | 194 | total = __countVisibleDelegates(child.visibleChildren, total) | ||
433 | 195 | } | ||
434 | 196 | } | ||
435 | 197 | return total | ||
436 | 198 | } | ||
437 | 199 | |||
438 | 200 | } | ||
439 | 201 | } | 198 | } |
440 | 202 | 199 | ||
441 | 203 | 200 | ||
442 | === renamed file 'tests/qmluitests/tst_ResponsiveGridView.qml' => 'tests/qmluitests/Components/tst_ResponsiveGridView.qml' | |||
443 | --- tests/qmluitests/tst_ResponsiveGridView.qml 2013-03-20 10:59:28 +0000 | |||
444 | +++ tests/qmluitests/Components/tst_ResponsiveGridView.qml 2013-04-09 10:00:31 +0000 | |||
445 | @@ -16,7 +16,8 @@ | |||
446 | 16 | 16 | ||
447 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
448 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
450 | 19 | import "../../Components" | 19 | import ".." |
451 | 20 | import "../../../Components" | ||
452 | 20 | import Ubuntu.Components.ListItems 0.1 as ListItem | 21 | import Ubuntu.Components.ListItems 0.1 as ListItem |
453 | 21 | import Ubuntu.Components 0.1 | 22 | import Ubuntu.Components 0.1 |
454 | 22 | 23 | ||
455 | @@ -24,6 +25,78 @@ | |||
456 | 24 | width: gridRect.width + controls.width | 25 | width: gridRect.width + controls.width |
457 | 25 | height: units.gu(80) | 26 | height: units.gu(80) |
458 | 26 | 27 | ||
459 | 28 | UnityTestCase { | ||
460 | 29 | name: "ResponsiveGridViewTest" | ||
461 | 30 | when: windowShown | ||
462 | 31 | |||
463 | 32 | function test_maximumNumberOfColumns_data() { | ||
464 | 33 | var data = new Array() | ||
465 | 34 | |||
466 | 35 | data.push({selectedIndex: 0, maxColumnCount:2, columnCount: 2}) | ||
467 | 36 | data.push({selectedIndex: 1, maxColumnCount:4, columnCount: 4}) | ||
468 | 37 | data.push({selectedIndex: 2, maxColumnCount:8, columnCount: 8}) | ||
469 | 38 | data.push({selectedIndex: 4, maxColumnCount:1000, columnCount: 13}) | ||
470 | 39 | |||
471 | 40 | return data | ||
472 | 41 | } | ||
473 | 42 | |||
474 | 43 | /* Change ResponsiveGridView's maximumNumberOfColumns property and check | ||
475 | 44 | that the resulting number of columns matches expectations */ | ||
476 | 45 | function test_maximumNumberOfColumns(data) { | ||
477 | 46 | minHSpacingSelector.selectedIndex = 0 | ||
478 | 47 | |||
479 | 48 | // sanity checks | ||
480 | 49 | compare(maxColumnsSelector.values[data.selectedIndex], data.maxColumnCount) | ||
481 | 50 | compare(minHSpacingSelector.values[0], 0) | ||
482 | 51 | |||
483 | 52 | maxColumnsSelector.selectedIndex = data.selectedIndex | ||
484 | 53 | tryCompareFunction(countGridDelegatesOnFirstRow, data.columnCount); | ||
485 | 54 | compare(grid.columns, data.columnCount) | ||
486 | 55 | } | ||
487 | 56 | |||
488 | 57 | function test_minimumHorizontalSpacing_data() { | ||
489 | 58 | var data = new Array() | ||
490 | 59 | |||
491 | 60 | data.push({selectedIndex: 0, minHSpacing:0, columnCount: 13}) | ||
492 | 61 | data.push({selectedIndex: 1, minHSpacing:units.gu(2), columnCount: 9}) | ||
493 | 62 | data.push({selectedIndex: 2, minHSpacing:units.gu(8), columnCount: 5}) | ||
494 | 63 | data.push({selectedIndex: 3, minHSpacing:units.gu(25), columnCount: 2}) | ||
495 | 64 | |||
496 | 65 | return data | ||
497 | 66 | } | ||
498 | 67 | |||
499 | 68 | /* Change ResponsiveGridView's minimumHorizontalSpacing property and check | ||
500 | 69 | that the resulting number of columns matches expectations */ | ||
501 | 70 | function test_minimumHorizontalSpacing(data) { | ||
502 | 71 | maxColumnsSelector.selectedIndex = 4 | ||
503 | 72 | |||
504 | 73 | // sanity checks | ||
505 | 74 | compare(maxColumnsSelector.values[4], 1000) | ||
506 | 75 | compare(minHSpacingSelector.values[data.selectedIndex], data.minHSpacing) | ||
507 | 76 | |||
508 | 77 | minHSpacingSelector.selectedIndex = data.selectedIndex | ||
509 | 78 | tryCompareFunction(countGridDelegatesOnFirstRow, data.columnCount); | ||
510 | 79 | compare(grid.columns, data.columnCount) | ||
511 | 80 | } | ||
512 | 81 | |||
513 | 82 | |||
514 | 83 | function countGridDelegatesOnFirstRow() { | ||
515 | 84 | return __countGridDelegatesOnFirstRow(grid.visibleChildren, 0) | ||
516 | 85 | } | ||
517 | 86 | |||
518 | 87 | function __countGridDelegatesOnFirstRow(objList, total) { | ||
519 | 88 | for (var i = 0; i < objList.length; ++i) { | ||
520 | 89 | var child = objList[i]; | ||
521 | 90 | if (child.isGridDelegate !== undefined && child.y === 0) { | ||
522 | 91 | ++total; | ||
523 | 92 | } else { | ||
524 | 93 | total = __countGridDelegatesOnFirstRow(child.visibleChildren, total) | ||
525 | 94 | } | ||
526 | 95 | } | ||
527 | 96 | return total | ||
528 | 97 | } | ||
529 | 98 | } | ||
530 | 99 | |||
531 | 27 | Column { | 100 | Column { |
532 | 28 | id: controls | 101 | id: controls |
533 | 29 | width: units.gu(40) | 102 | width: units.gu(40) |
534 | @@ -116,76 +189,4 @@ | |||
535 | 116 | } | 189 | } |
536 | 117 | } | 190 | } |
537 | 118 | } | 191 | } |
538 | 119 | |||
539 | 120 | UnityTestCase { | ||
540 | 121 | name: "ResponsiveGridView" | ||
541 | 122 | when: windowShown | ||
542 | 123 | |||
543 | 124 | function test_maximumNumberOfColumns_data() { | ||
544 | 125 | var data = new Array() | ||
545 | 126 | |||
546 | 127 | data.push({selectedIndex: 0, maxColumnCount:2, columnCount: 2}) | ||
547 | 128 | data.push({selectedIndex: 1, maxColumnCount:4, columnCount: 4}) | ||
548 | 129 | data.push({selectedIndex: 2, maxColumnCount:8, columnCount: 8}) | ||
549 | 130 | data.push({selectedIndex: 4, maxColumnCount:1000, columnCount: 13}) | ||
550 | 131 | |||
551 | 132 | return data | ||
552 | 133 | } | ||
553 | 134 | |||
554 | 135 | /* Change ResponsiveGridView's maximumNumberOfColumns property and check | ||
555 | 136 | that the resulting number of columns matches expectations */ | ||
556 | 137 | function test_maximumNumberOfColumns(data) { | ||
557 | 138 | minHSpacingSelector.selectedIndex = 0 | ||
558 | 139 | |||
559 | 140 | // sanity checks | ||
560 | 141 | compare(maxColumnsSelector.values[data.selectedIndex], data.maxColumnCount) | ||
561 | 142 | compare(minHSpacingSelector.values[0], 0) | ||
562 | 143 | |||
563 | 144 | maxColumnsSelector.selectedIndex = data.selectedIndex | ||
564 | 145 | tryCompareFunction(countGridDelegatesOnFirstRow, data.columnCount); | ||
565 | 146 | compare(grid.columns, data.columnCount) | ||
566 | 147 | } | ||
567 | 148 | |||
568 | 149 | function test_minimumHorizontalSpacing_data() { | ||
569 | 150 | var data = new Array() | ||
570 | 151 | |||
571 | 152 | data.push({selectedIndex: 0, minHSpacing:0, columnCount: 13}) | ||
572 | 153 | data.push({selectedIndex: 1, minHSpacing:units.gu(2), columnCount: 9}) | ||
573 | 154 | data.push({selectedIndex: 2, minHSpacing:units.gu(8), columnCount: 5}) | ||
574 | 155 | data.push({selectedIndex: 3, minHSpacing:units.gu(25), columnCount: 2}) | ||
575 | 156 | |||
576 | 157 | return data | ||
577 | 158 | } | ||
578 | 159 | |||
579 | 160 | /* Change ResponsiveGridView's minimumHorizontalSpacing property and check | ||
580 | 161 | that the resulting number of columns matches expectations */ | ||
581 | 162 | function test_minimumHorizontalSpacing(data) { | ||
582 | 163 | maxColumnsSelector.selectedIndex = 4 | ||
583 | 164 | |||
584 | 165 | // sanity checks | ||
585 | 166 | compare(maxColumnsSelector.values[4], 1000) | ||
586 | 167 | compare(minHSpacingSelector.values[data.selectedIndex], data.minHSpacing) | ||
587 | 168 | |||
588 | 169 | minHSpacingSelector.selectedIndex = data.selectedIndex | ||
589 | 170 | tryCompareFunction(countGridDelegatesOnFirstRow, data.columnCount); | ||
590 | 171 | compare(grid.columns, data.columnCount) | ||
591 | 172 | } | ||
592 | 173 | |||
593 | 174 | |||
594 | 175 | function countGridDelegatesOnFirstRow() { | ||
595 | 176 | return __countGridDelegatesOnFirstRow(grid.visibleChildren, 0) | ||
596 | 177 | } | ||
597 | 178 | |||
598 | 179 | function __countGridDelegatesOnFirstRow(objList, total) { | ||
599 | 180 | for (var i = 0; i < objList.length; ++i) { | ||
600 | 181 | var child = objList[i]; | ||
601 | 182 | if (child.isGridDelegate !== undefined && child.y === 0) { | ||
602 | 183 | ++total; | ||
603 | 184 | } else { | ||
604 | 185 | total = __countGridDelegatesOnFirstRow(child.visibleChildren, total) | ||
605 | 186 | } | ||
606 | 187 | } | ||
607 | 188 | return total | ||
608 | 189 | } | ||
609 | 190 | } | ||
610 | 191 | } | 192 | } |
611 | 192 | 193 | ||
612 | === renamed file 'tests/qmluitests/tst_Revealer.qml' => 'tests/qmluitests/Components/tst_Revealer.qml' | |||
613 | --- tests/qmluitests/tst_Revealer.qml 2013-03-19 12:19:11 +0000 | |||
614 | +++ tests/qmluitests/Components/tst_Revealer.qml 2013-04-09 10:00:31 +0000 | |||
615 | @@ -16,6 +16,7 @@ | |||
616 | 16 | 16 | ||
617 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
618 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
619 | 19 | import ".." | ||
620 | 19 | 20 | ||
621 | 20 | /* | 21 | /* |
622 | 21 | There's a revealer on each window edge. If you press and hold any edge you | 22 | There's a revealer on each window edge. If you press and hold any edge you |
623 | @@ -31,36 +32,8 @@ | |||
624 | 31 | width: units.gu(75) | 32 | width: units.gu(75) |
625 | 32 | height: units.gu(50) | 33 | height: units.gu(50) |
626 | 33 | 34 | ||
627 | 34 | RevealingRectangle { | ||
628 | 35 | id: topRevealingRectangle | ||
629 | 36 | anchors.fill: parent | ||
630 | 37 | orientation: Qt.Vertical | ||
631 | 38 | direction: Qt.LeftToRight | ||
632 | 39 | } | ||
633 | 40 | |||
634 | 41 | RevealingRectangle { | ||
635 | 42 | id: bottomRevealingRectangle | ||
636 | 43 | anchors.fill: parent | ||
637 | 44 | orientation: Qt.Vertical | ||
638 | 45 | direction: Qt.RightToLeft | ||
639 | 46 | } | ||
640 | 47 | |||
641 | 48 | RevealingRectangle { | ||
642 | 49 | id: leftRevealingRectangle | ||
643 | 50 | anchors.fill: parent | ||
644 | 51 | orientation: Qt.Horizontal | ||
645 | 52 | direction: Qt.LeftToRight | ||
646 | 53 | } | ||
647 | 54 | |||
648 | 55 | RevealingRectangle { | ||
649 | 56 | id: rightRevealingRectangle | ||
650 | 57 | anchors.fill: parent | ||
651 | 58 | orientation: Qt.Horizontal | ||
652 | 59 | direction: Qt.RightToLeft | ||
653 | 60 | } | ||
654 | 61 | |||
655 | 62 | UnityTestCase { | 35 | UnityTestCase { |
657 | 63 | name: "Revealer" | 36 | name: "RevealerTest" |
658 | 64 | when: windowShown | 37 | when: windowShown |
659 | 65 | 38 | ||
660 | 66 | /* | 39 | /* |
661 | @@ -258,5 +231,33 @@ | |||
662 | 258 | tryCompare(showable, "y", -showable.height) | 231 | tryCompare(showable, "y", -showable.height) |
663 | 259 | } | 232 | } |
664 | 260 | } | 233 | } |
665 | 234 | |||
666 | 235 | RevealingRectangle { | ||
667 | 236 | id: topRevealingRectangle | ||
668 | 237 | anchors.fill: parent | ||
669 | 238 | orientation: Qt.Vertical | ||
670 | 239 | direction: Qt.LeftToRight | ||
671 | 240 | } | ||
672 | 241 | |||
673 | 242 | RevealingRectangle { | ||
674 | 243 | id: bottomRevealingRectangle | ||
675 | 244 | anchors.fill: parent | ||
676 | 245 | orientation: Qt.Vertical | ||
677 | 246 | direction: Qt.RightToLeft | ||
678 | 247 | } | ||
679 | 248 | |||
680 | 249 | RevealingRectangle { | ||
681 | 250 | id: leftRevealingRectangle | ||
682 | 251 | anchors.fill: parent | ||
683 | 252 | orientation: Qt.Horizontal | ||
684 | 253 | direction: Qt.LeftToRight | ||
685 | 254 | } | ||
686 | 255 | |||
687 | 256 | RevealingRectangle { | ||
688 | 257 | id: rightRevealingRectangle | ||
689 | 258 | anchors.fill: parent | ||
690 | 259 | orientation: Qt.Horizontal | ||
691 | 260 | direction: Qt.RightToLeft | ||
692 | 261 | } | ||
693 | 261 | } | 262 | } |
694 | 262 | 263 | ||
695 | 263 | 264 | ||
696 | === renamed file 'tests/qmluitests/tst_Showable.qml' => 'tests/qmluitests/Components/tst_Showable.qml' | |||
697 | --- tests/qmluitests/tst_Showable.qml 2013-04-02 10:45:33 +0000 | |||
698 | +++ tests/qmluitests/Components/tst_Showable.qml 2013-04-09 10:00:31 +0000 | |||
699 | @@ -17,7 +17,8 @@ | |||
700 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
701 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
702 | 19 | import Ubuntu.Components 0.1 | 19 | import Ubuntu.Components 0.1 |
704 | 20 | import "../../Components" | 20 | import ".." |
705 | 21 | import "../../../Components" | ||
706 | 21 | 22 | ||
707 | 22 | /* | 23 | /* |
708 | 23 | There will be 3 stacked rectangles, red, green & blue. Initially they | 24 | There will be 3 stacked rectangles, red, green & blue. Initially they |
709 | @@ -31,77 +32,8 @@ | |||
710 | 31 | width: units.gu(40) | 32 | width: units.gu(40) |
711 | 32 | height: units.gu(60) | 33 | height: units.gu(60) |
712 | 33 | 34 | ||
713 | 34 | Showable { | ||
714 | 35 | id: show1 | ||
715 | 36 | anchors.left: parent.left | ||
716 | 37 | anchors.top: parent.top | ||
717 | 38 | anchors.right: parent.right | ||
718 | 39 | height: units.gu(20) | ||
719 | 40 | |||
720 | 41 | opacity: 0.2 | ||
721 | 42 | shown: false | ||
722 | 43 | hides: [show2, show3] | ||
723 | 44 | showAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 1.0; easing.type: Easing.OutCubic } | ||
724 | 45 | hideAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 0.2; easing.type: Easing.OutCubic } | ||
725 | 46 | |||
726 | 47 | Rectangle { | ||
727 | 48 | anchors.fill: parent | ||
728 | 49 | color: "red" | ||
729 | 50 | } | ||
730 | 51 | MouseArea { | ||
731 | 52 | anchors.fill: parent | ||
732 | 53 | onClicked: { parent.show() } | ||
733 | 54 | } | ||
734 | 55 | } | ||
735 | 56 | |||
736 | 57 | Showable { | ||
737 | 58 | id: show2 | ||
738 | 59 | anchors.left: parent.left | ||
739 | 60 | anchors.top: show1.bottom | ||
740 | 61 | anchors.right: parent.right | ||
741 | 62 | height: units.gu(20) | ||
742 | 63 | |||
743 | 64 | opacity: 0.2 | ||
744 | 65 | shown: false | ||
745 | 66 | hides: [show1, show3] | ||
746 | 67 | showAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 1.0; easing.type: Easing.OutCubic } | ||
747 | 68 | hideAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 0.2; easing.type: Easing.OutCubic } | ||
748 | 69 | |||
749 | 70 | Rectangle { | ||
750 | 71 | anchors.fill: parent | ||
751 | 72 | color: "green" | ||
752 | 73 | } | ||
753 | 74 | MouseArea { | ||
754 | 75 | anchors.fill: parent | ||
755 | 76 | onClicked: { parent.show() } | ||
756 | 77 | } | ||
757 | 78 | } | ||
758 | 79 | |||
759 | 80 | Showable { | ||
760 | 81 | id: show3 | ||
761 | 82 | anchors.left: parent.left | ||
762 | 83 | anchors.top: show2.bottom | ||
763 | 84 | anchors.right: parent.right | ||
764 | 85 | anchors.bottom: parent.bottom | ||
765 | 86 | |||
766 | 87 | opacity: 0.1 | ||
767 | 88 | shown: false | ||
768 | 89 | hides: [show1, show2] | ||
769 | 90 | showAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 1.0; easing.type: Easing.OutCubic } | ||
770 | 91 | hideAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 0.2; easing.type: Easing.OutCubic } | ||
771 | 92 | |||
772 | 93 | Rectangle { | ||
773 | 94 | anchors.fill: parent | ||
774 | 95 | color: "blue" | ||
775 | 96 | } | ||
776 | 97 | MouseArea { | ||
777 | 98 | anchors.fill: parent | ||
778 | 99 | onClicked: { parent.show() } | ||
779 | 100 | } | ||
780 | 101 | } | ||
781 | 102 | |||
782 | 103 | UnityTestCase { | 35 | UnityTestCase { |
784 | 104 | name: "Showable" | 36 | name: "ShowableTest" |
785 | 105 | when: windowShown | 37 | when: windowShown |
786 | 106 | 38 | ||
787 | 107 | function init_test() { | 39 | function init_test() { |
788 | @@ -155,4 +87,73 @@ | |||
789 | 155 | compare(show1.shown, true, "Showable should automatically show when created changes to true if attempted to show before."); | 87 | compare(show1.shown, true, "Showable should automatically show when created changes to true if attempted to show before."); |
790 | 156 | } | 88 | } |
791 | 157 | } | 89 | } |
792 | 90 | |||
793 | 91 | Showable { | ||
794 | 92 | id: show1 | ||
795 | 93 | anchors.left: parent.left | ||
796 | 94 | anchors.top: parent.top | ||
797 | 95 | anchors.right: parent.right | ||
798 | 96 | height: units.gu(20) | ||
799 | 97 | |||
800 | 98 | opacity: 0.2 | ||
801 | 99 | shown: false | ||
802 | 100 | hides: [show2, show3] | ||
803 | 101 | showAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 1.0; easing.type: Easing.OutCubic } | ||
804 | 102 | hideAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 0.2; easing.type: Easing.OutCubic } | ||
805 | 103 | |||
806 | 104 | Rectangle { | ||
807 | 105 | anchors.fill: parent | ||
808 | 106 | color: "red" | ||
809 | 107 | } | ||
810 | 108 | MouseArea { | ||
811 | 109 | anchors.fill: parent | ||
812 | 110 | onClicked: { parent.show() } | ||
813 | 111 | } | ||
814 | 112 | } | ||
815 | 113 | |||
816 | 114 | Showable { | ||
817 | 115 | id: show2 | ||
818 | 116 | anchors.left: parent.left | ||
819 | 117 | anchors.top: show1.bottom | ||
820 | 118 | anchors.right: parent.right | ||
821 | 119 | height: units.gu(20) | ||
822 | 120 | |||
823 | 121 | opacity: 0.2 | ||
824 | 122 | shown: false | ||
825 | 123 | hides: [show1, show3] | ||
826 | 124 | showAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 1.0; easing.type: Easing.OutCubic } | ||
827 | 125 | hideAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 0.2; easing.type: Easing.OutCubic } | ||
828 | 126 | |||
829 | 127 | Rectangle { | ||
830 | 128 | anchors.fill: parent | ||
831 | 129 | color: "green" | ||
832 | 130 | } | ||
833 | 131 | MouseArea { | ||
834 | 132 | anchors.fill: parent | ||
835 | 133 | onClicked: { parent.show() } | ||
836 | 134 | } | ||
837 | 135 | } | ||
838 | 136 | |||
839 | 137 | Showable { | ||
840 | 138 | id: show3 | ||
841 | 139 | anchors.left: parent.left | ||
842 | 140 | anchors.top: show2.bottom | ||
843 | 141 | anchors.right: parent.right | ||
844 | 142 | anchors.bottom: parent.bottom | ||
845 | 143 | |||
846 | 144 | opacity: 0.1 | ||
847 | 145 | shown: false | ||
848 | 146 | hides: [show1, show2] | ||
849 | 147 | showAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 1.0; easing.type: Easing.OutCubic } | ||
850 | 148 | hideAnimation: StandardAnimation { property: "opacity"; duration: 350; to: 0.2; easing.type: Easing.OutCubic } | ||
851 | 149 | |||
852 | 150 | Rectangle { | ||
853 | 151 | anchors.fill: parent | ||
854 | 152 | color: "blue" | ||
855 | 153 | } | ||
856 | 154 | MouseArea { | ||
857 | 155 | anchors.fill: parent | ||
858 | 156 | onClicked: { parent.show() } | ||
859 | 157 | } | ||
860 | 158 | } | ||
861 | 158 | } | 159 | } |
862 | 159 | 160 | ||
863 | === renamed directory 'tests/qmluitests/tst_Stage' => 'tests/qmluitests/Components/tst_Stage' | |||
864 | === renamed file 'tests/qmluitests/tst_Stage.qml' => 'tests/qmluitests/Components/tst_Stage.qml' | |||
865 | --- tests/qmluitests/tst_Stage.qml 2013-04-02 21:33:33 +0000 | |||
866 | +++ tests/qmluitests/Components/tst_Stage.qml 2013-04-09 10:00:31 +0000 | |||
867 | @@ -16,9 +16,10 @@ | |||
868 | 16 | 16 | ||
869 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
870 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
872 | 19 | import "../../Components" | 19 | import ".." |
873 | 20 | import "../../../Components" | ||
874 | 20 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 0.1 |
876 | 21 | import "../../Applications/applications.js" as ApplicationsModel | 22 | import "../../../Applications/applications.js" as ApplicationsModel |
877 | 22 | import "tst_Stage" | 23 | import "tst_Stage" |
878 | 23 | 24 | ||
879 | 24 | Rectangle { | 25 | Rectangle { |
880 | @@ -27,6 +28,146 @@ | |||
881 | 27 | width: units.gu(70) | 28 | width: units.gu(70) |
882 | 28 | height: stageRect.height | 29 | height: stageRect.height |
883 | 29 | 30 | ||
884 | 31 | UnityTestCase { | ||
885 | 32 | name: "StageTest" | ||
886 | 33 | when: windowShown | ||
887 | 34 | |||
888 | 35 | /* If you press Stage's right edge it should show the hint that it's possible to | ||
889 | 36 | switch to the next running application. This means (graphically) sliding the | ||
890 | 37 | next application window from Stage's right edge for a small part of its width */ | ||
891 | 38 | function test_pressingRightEdgeShowsHint() { | ||
892 | 39 | |||
893 | 40 | // it shoulnd't be showing anything at first | ||
894 | 41 | compare(stage.usingScreenshots, false) | ||
895 | 42 | |||
896 | 43 | redControl.checked = true | ||
897 | 44 | |||
898 | 45 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
899 | 46 | wait(600) | ||
900 | 47 | tryCompare(stage, "usingScreenshots", false) // and then for it to end | ||
901 | 48 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red") | ||
902 | 49 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red") | ||
903 | 50 | |||
904 | 51 | greenControl.checked = true | ||
905 | 52 | |||
906 | 53 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
907 | 54 | wait(600) | ||
908 | 55 | tryCompare(stage, "usingScreenshots", false) // and then for it to end | ||
909 | 56 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "green") | ||
910 | 57 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "green") | ||
911 | 58 | |||
912 | 59 | var draggingAreaCenterX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2) | ||
913 | 60 | var draggingAreaCenterY = stage.height / 2 | ||
914 | 61 | mousePress(stage, draggingAreaCenterX, draggingAreaCenterY) | ||
915 | 62 | |||
916 | 63 | // wait for the animation to start | ||
917 | 64 | tryCompare(stage, "usingScreenshots", true) | ||
918 | 65 | |||
919 | 66 | // "red" should be the new/next application being shown | ||
920 | 67 | compare(newAppScreenshot.application.desktopFile, "red") | ||
921 | 68 | tryCompareFunction(isShowingABitOfNewApp, true); | ||
922 | 69 | |||
923 | 70 | // "green" should be the current application being shown | ||
924 | 71 | compare(oldAppScreenshot.application.desktopFile, "green") | ||
925 | 72 | tryCompareFunction(isCurrentAppFadingOut, true); | ||
926 | 73 | |||
927 | 74 | mouseRelease(stage, draggingAreaCenterX, draggingAreaCenterY) | ||
928 | 75 | } | ||
929 | 76 | |||
930 | 77 | function isShowingABitOfNewApp() { | ||
931 | 78 | // it should come from the right and take less than half of the screen | ||
932 | 79 | // but at least 15% of it | ||
933 | 80 | return newAppScreenshot.x > stage.width/2 | ||
934 | 81 | && newAppScreenshot.x < stage.width*(85/100) | ||
935 | 82 | && newAppScreenshot.y === 0 | ||
936 | 83 | && newAppScreenshot.visible | ||
937 | 84 | } | ||
938 | 85 | |||
939 | 86 | function isCurrentAppFadingOut() { | ||
940 | 87 | // it should get a bit translucent and smaller | ||
941 | 88 | return oldAppScreenshot.opacity < 0.98 | ||
942 | 89 | && oldAppScreenshot.opacity >= 0.1 | ||
943 | 90 | && oldAppScreenshot.scale < 0.98 | ||
944 | 91 | && oldAppScreenshot.scale >= 0.1 | ||
945 | 92 | && oldAppScreenshot.visible | ||
946 | 93 | } | ||
947 | 94 | |||
948 | 95 | function init() { | ||
949 | 96 | redControl.checked = false; | ||
950 | 97 | greenControl.checked = false; | ||
951 | 98 | blueControl.checked = false; | ||
952 | 99 | // give some room for animations to start | ||
953 | 100 | wait(50) | ||
954 | 101 | // wait until animations end, if any | ||
955 | 102 | tryCompare(stage, "usingScreenshots", false) | ||
956 | 103 | } | ||
957 | 104 | |||
958 | 105 | /* If you flick from the right edge of the stage leftwards it should cause an | ||
959 | 106 | application switch. */ | ||
960 | 107 | function test_dragFromRightEdgeToSwitchApplication() { | ||
961 | 108 | // it shoulnd't be showing anything at first | ||
962 | 109 | compare(stage.usingScreenshots, false) | ||
963 | 110 | |||
964 | 111 | redControl.checked = true | ||
965 | 112 | |||
966 | 113 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
967 | 114 | tryCompare(stage, "usingScreenshots", false) // and then for it to end | ||
968 | 115 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red") | ||
969 | 116 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red") | ||
970 | 117 | |||
971 | 118 | greenControl.checked = true | ||
972 | 119 | |||
973 | 120 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
974 | 121 | tryCompare(stage, "usingScreenshots", false) // and then for it to end | ||
975 | 122 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "green") | ||
976 | 123 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "green") | ||
977 | 124 | |||
978 | 125 | var mouseX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2) | ||
979 | 126 | var mouseY = stage.height / 2 | ||
980 | 127 | mouseFlick(stage, mouseX, mouseY, | ||
981 | 128 | mouseX - units.gu(5), mouseY) | ||
982 | 129 | |||
983 | 130 | // wait until animations end, if any | ||
984 | 131 | tryCompare(stage, "usingScreenshots", false) | ||
985 | 132 | |||
986 | 133 | // "red" should be the new topmost, focused, application | ||
987 | 134 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red") | ||
988 | 135 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red") | ||
989 | 136 | } | ||
990 | 137 | |||
991 | 138 | /* When an application is launched, it needs a background before it's drawn on screen | ||
992 | 139 | so that the user does not see the previous running app while the new one is launching. | ||
993 | 140 | When switching between applications, backgrounds are unnecessary, 'cause the | ||
994 | 141 | applications are in front of them. */ | ||
995 | 142 | function test_background() { | ||
996 | 143 | // it shoulnd't be showing anything at first | ||
997 | 144 | compare(stage.usingScreenshots, false) | ||
998 | 145 | |||
999 | 146 | redControl.checked = true | ||
1000 | 147 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
1001 | 148 | |||
1002 | 149 | compare(newAppScreenshot.withBackground, true, "starting app screenshot does not have background enabled") | ||
1003 | 150 | |||
1004 | 151 | tryCompare(stage, "usingScreenshots", false) // wait for the animation to finish | ||
1005 | 152 | |||
1006 | 153 | greenControl.checked = true | ||
1007 | 154 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
1008 | 155 | tryCompare(stage, "usingScreenshots", false) // and finish | ||
1009 | 156 | |||
1010 | 157 | var draggingAreaCenterX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2) | ||
1011 | 158 | var draggingAreaCenterY = stage.height / 2 | ||
1012 | 159 | mousePress(stage, draggingAreaCenterX, draggingAreaCenterY) | ||
1013 | 160 | |||
1014 | 161 | // wait for the animation to start | ||
1015 | 162 | tryCompare(stage, "usingScreenshots", true) | ||
1016 | 163 | |||
1017 | 164 | compare(newAppScreenshot.withBackground, false, "switched app does have background enabled") | ||
1018 | 165 | |||
1019 | 166 | tryCompareFunction(isShowingABitOfNewApp, true); // wait for the hint animation to finish | ||
1020 | 167 | mouseRelease(stage, draggingAreaCenterX, draggingAreaCenterY) | ||
1021 | 168 | } | ||
1022 | 169 | } | ||
1023 | 170 | |||
1024 | 30 | // Even though we replace the ApplicationScreenshot instances in Stage | 171 | // Even though we replace the ApplicationScreenshot instances in Stage |
1025 | 31 | // with our own fake ones, ApplicationScreenshot.qml still gives out a warning | 172 | // with our own fake ones, ApplicationScreenshot.qml still gives out a warning |
1026 | 32 | // if shell.importUbuntuApplicationAvailable is missing. | 173 | // if shell.importUbuntuApplicationAvailable is missing. |
1027 | @@ -190,144 +331,4 @@ | |||
1028 | 190 | AppControl {id: blueControl; desktopFile:"blue"} | 331 | AppControl {id: blueControl; desktopFile:"blue"} |
1029 | 191 | } | 332 | } |
1030 | 192 | } | 333 | } |
1031 | 193 | |||
1032 | 194 | UnityTestCase { | ||
1033 | 195 | name: "Stage" | ||
1034 | 196 | when: windowShown | ||
1035 | 197 | |||
1036 | 198 | /* If you press Stage's right edge it should show the hint that it's possible to | ||
1037 | 199 | switch to the next running application. This means (graphically) sliding the | ||
1038 | 200 | next application window from Stage's right edge for a small part of its width */ | ||
1039 | 201 | function test_pressingRightEdgeShowsHint() { | ||
1040 | 202 | |||
1041 | 203 | // it shoulnd't be showing anything at first | ||
1042 | 204 | compare(stage.usingScreenshots, false) | ||
1043 | 205 | |||
1044 | 206 | redControl.checked = true | ||
1045 | 207 | |||
1046 | 208 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
1047 | 209 | wait(600) | ||
1048 | 210 | tryCompare(stage, "usingScreenshots", false) // and then for it to end | ||
1049 | 211 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red") | ||
1050 | 212 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red") | ||
1051 | 213 | |||
1052 | 214 | greenControl.checked = true | ||
1053 | 215 | |||
1054 | 216 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
1055 | 217 | wait(600) | ||
1056 | 218 | tryCompare(stage, "usingScreenshots", false) // and then for it to end | ||
1057 | 219 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "green") | ||
1058 | 220 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "green") | ||
1059 | 221 | |||
1060 | 222 | var draggingAreaCenterX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2) | ||
1061 | 223 | var draggingAreaCenterY = stage.height / 2 | ||
1062 | 224 | mousePress(stage, draggingAreaCenterX, draggingAreaCenterY) | ||
1063 | 225 | |||
1064 | 226 | // wait for the animation to start | ||
1065 | 227 | tryCompare(stage, "usingScreenshots", true) | ||
1066 | 228 | |||
1067 | 229 | // "red" should be the new/next application being shown | ||
1068 | 230 | compare(newAppScreenshot.application.desktopFile, "red") | ||
1069 | 231 | tryCompareFunction(isShowingABitOfNewApp, true); | ||
1070 | 232 | |||
1071 | 233 | // "green" should be the current application being shown | ||
1072 | 234 | compare(oldAppScreenshot.application.desktopFile, "green") | ||
1073 | 235 | tryCompareFunction(isCurrentAppFadingOut, true); | ||
1074 | 236 | |||
1075 | 237 | mouseRelease(stage, draggingAreaCenterX, draggingAreaCenterY) | ||
1076 | 238 | } | ||
1077 | 239 | |||
1078 | 240 | function isShowingABitOfNewApp() { | ||
1079 | 241 | // it should come from the right and take less than half of the screen | ||
1080 | 242 | // but at least 15% of it | ||
1081 | 243 | return newAppScreenshot.x > stage.width/2 | ||
1082 | 244 | && newAppScreenshot.x < stage.width*(85/100) | ||
1083 | 245 | && newAppScreenshot.y === 0 | ||
1084 | 246 | && newAppScreenshot.visible | ||
1085 | 247 | } | ||
1086 | 248 | |||
1087 | 249 | function isCurrentAppFadingOut() { | ||
1088 | 250 | // it should get a bit translucent and smaller | ||
1089 | 251 | return oldAppScreenshot.opacity < 0.98 | ||
1090 | 252 | && oldAppScreenshot.opacity >= 0.1 | ||
1091 | 253 | && oldAppScreenshot.scale < 0.98 | ||
1092 | 254 | && oldAppScreenshot.scale >= 0.1 | ||
1093 | 255 | && oldAppScreenshot.visible | ||
1094 | 256 | } | ||
1095 | 257 | |||
1096 | 258 | function init() { | ||
1097 | 259 | redControl.checked = false; | ||
1098 | 260 | greenControl.checked = false; | ||
1099 | 261 | blueControl.checked = false; | ||
1100 | 262 | // give some room for animations to start | ||
1101 | 263 | wait(50) | ||
1102 | 264 | // wait until animations end, if any | ||
1103 | 265 | tryCompare(stage, "usingScreenshots", false) | ||
1104 | 266 | } | ||
1105 | 267 | |||
1106 | 268 | /* If you flick from the right edge of the stage leftwards it should cause an | ||
1107 | 269 | application switch. */ | ||
1108 | 270 | function test_dragFromRightEdgeToSwitchApplication() { | ||
1109 | 271 | // it shoulnd't be showing anything at first | ||
1110 | 272 | compare(stage.usingScreenshots, false) | ||
1111 | 273 | |||
1112 | 274 | redControl.checked = true | ||
1113 | 275 | |||
1114 | 276 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
1115 | 277 | tryCompare(stage, "usingScreenshots", false) // and then for it to end | ||
1116 | 278 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red") | ||
1117 | 279 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red") | ||
1118 | 280 | |||
1119 | 281 | greenControl.checked = true | ||
1120 | 282 | |||
1121 | 283 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
1122 | 284 | tryCompare(stage, "usingScreenshots", false) // and then for it to end | ||
1123 | 285 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "green") | ||
1124 | 286 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "green") | ||
1125 | 287 | |||
1126 | 288 | var mouseX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2) | ||
1127 | 289 | var mouseY = stage.height / 2 | ||
1128 | 290 | mouseFlick(stage, mouseX, mouseY, | ||
1129 | 291 | mouseX - units.gu(5), mouseY) | ||
1130 | 292 | |||
1131 | 293 | // wait until animations end, if any | ||
1132 | 294 | tryCompare(stage, "usingScreenshots", false) | ||
1133 | 295 | |||
1134 | 296 | // "red" should be the new topmost, focused, application | ||
1135 | 297 | compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red") | ||
1136 | 298 | compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red") | ||
1137 | 299 | } | ||
1138 | 300 | |||
1139 | 301 | /* When an application is launched, it needs a background before it's drawn on screen | ||
1140 | 302 | so that the user does not see the previous running app while the new one is launching. | ||
1141 | 303 | When switching between applications, backgrounds are unnecessary, 'cause the | ||
1142 | 304 | applications are in front of them. */ | ||
1143 | 305 | function test_background() { | ||
1144 | 306 | // it shoulnd't be showing anything at first | ||
1145 | 307 | compare(stage.usingScreenshots, false) | ||
1146 | 308 | |||
1147 | 309 | redControl.checked = true | ||
1148 | 310 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
1149 | 311 | |||
1150 | 312 | compare(newAppScreenshot.withBackground, true, "starting app screenshot does not have background enabled") | ||
1151 | 313 | |||
1152 | 314 | tryCompare(stage, "usingScreenshots", false) // wait for the animation to finish | ||
1153 | 315 | |||
1154 | 316 | greenControl.checked = true | ||
1155 | 317 | tryCompare(stage, "usingScreenshots", true) // wait for the animation to start | ||
1156 | 318 | tryCompare(stage, "usingScreenshots", false) // and finish | ||
1157 | 319 | |||
1158 | 320 | var draggingAreaCenterX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2) | ||
1159 | 321 | var draggingAreaCenterY = stage.height / 2 | ||
1160 | 322 | mousePress(stage, draggingAreaCenterX, draggingAreaCenterY) | ||
1161 | 323 | |||
1162 | 324 | // wait for the animation to start | ||
1163 | 325 | tryCompare(stage, "usingScreenshots", true) | ||
1164 | 326 | |||
1165 | 327 | compare(newAppScreenshot.withBackground, false, "switched app does have background enabled") | ||
1166 | 328 | |||
1167 | 329 | tryCompareFunction(isShowingABitOfNewApp, true); // wait for the hint animation to finish | ||
1168 | 330 | mouseRelease(stage, draggingAreaCenterX, draggingAreaCenterY) | ||
1169 | 331 | } | ||
1170 | 332 | } | ||
1171 | 333 | } | 334 | } |
1172 | 334 | 335 | ||
1173 | === renamed file 'tests/qmluitests/tst_Tile.qml' => 'tests/qmluitests/Components/tst_Tile.qml' | |||
1174 | --- tests/qmluitests/tst_Tile.qml 2013-04-08 11:52:36 +0000 | |||
1175 | +++ tests/qmluitests/Components/tst_Tile.qml 2013-04-09 10:00:31 +0000 | |||
1176 | @@ -16,7 +16,8 @@ | |||
1177 | 16 | 16 | ||
1178 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1179 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
1181 | 19 | import "../../Components" | 19 | import ".." |
1182 | 20 | import "../../../Components" | ||
1183 | 20 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 0.1 |
1184 | 21 | 22 | ||
1185 | 22 | Item { | 23 | Item { |
1186 | @@ -57,11 +58,11 @@ | |||
1187 | 57 | mouseRelease(label, 1, 1) | 58 | mouseRelease(label, 1, 1) |
1188 | 58 | } | 59 | } |
1189 | 59 | } | 60 | } |
1191 | 60 | 61 | ||
1192 | 61 | Tile { | 62 | Tile { |
1193 | 62 | id: tile | 63 | id: tile |
1194 | 63 | anchors.fill: parent | 64 | anchors.fill: parent |
1196 | 64 | source: "../../graphics/clock@18.png" | 65 | source: "../../../graphics/clock@18.png" |
1197 | 65 | text: "Testing rocks, debugging sucks!" | 66 | text: "Testing rocks, debugging sucks!" |
1198 | 66 | imageWidth: width | 67 | imageWidth: width |
1199 | 67 | imageHeight: width | 68 | imageHeight: width |
1200 | 68 | 69 | ||
1201 | === added directory 'tests/qmluitests/Dash' | |||
1202 | === added file 'tests/qmluitests/Dash/CMakeLists.txt' | |||
1203 | --- tests/qmluitests/Dash/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1204 | +++ tests/qmluitests/Dash/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
1205 | @@ -0,0 +1,1 @@ | |||
1206 | 1 | add_qml_test(DashPreview) | ||
1207 | 0 | 2 | ||
1208 | === renamed file 'tests/qmluitests/tst_DashPreview.qml' => 'tests/qmluitests/Dash/tst_DashPreview.qml' | |||
1209 | --- tests/qmluitests/tst_DashPreview.qml 2013-03-26 14:25:34 +0000 | |||
1210 | +++ tests/qmluitests/Dash/tst_DashPreview.qml 2013-04-09 10:00:31 +0000 | |||
1211 | @@ -16,7 +16,8 @@ | |||
1212 | 16 | 16 | ||
1213 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1214 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
1216 | 19 | import "../../Dash" | 19 | import ".." |
1217 | 20 | import "../../../Dash" | ||
1218 | 20 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 0.1 |
1219 | 21 | 22 | ||
1220 | 22 | Item { | 23 | Item { |
1221 | @@ -109,7 +110,7 @@ | |||
1222 | 109 | } | 110 | } |
1223 | 110 | 111 | ||
1224 | 111 | } | 112 | } |
1226 | 112 | 113 | ||
1227 | 113 | DashPreview { | 114 | DashPreview { |
1228 | 114 | id: preview | 115 | id: preview |
1229 | 115 | anchors.fill: parent | 116 | anchors.fill: parent |
1230 | 116 | 117 | ||
1231 | === added directory 'tests/qmluitests/Greeter' | |||
1232 | === added file 'tests/qmluitests/Greeter/CMakeLists.txt' | |||
1233 | --- tests/qmluitests/Greeter/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1234 | +++ tests/qmluitests/Greeter/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
1235 | @@ -0,0 +1,1 @@ | |||
1236 | 1 | add_qml_test(Greeter) | ||
1237 | 0 | 2 | ||
1238 | === renamed file 'tests/qmluitests/tst_Greeter.qml' => 'tests/qmluitests/Greeter/tst_Greeter.qml' | |||
1239 | --- tests/qmluitests/tst_Greeter.qml 2013-04-05 17:07:17 +0000 | |||
1240 | +++ tests/qmluitests/Greeter/tst_Greeter.qml 2013-04-09 10:00:31 +0000 | |||
1241 | @@ -16,16 +16,18 @@ | |||
1242 | 16 | 16 | ||
1243 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1244 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
1246 | 19 | import "../../Greeter" | 19 | import ".." |
1247 | 20 | import "../../../Greeter" | ||
1248 | 20 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 0.1 |
1249 | 21 | 22 | ||
1250 | 22 | Item { | 23 | Item { |
1251 | 23 | width: units.gu(120) | 24 | width: units.gu(120) |
1252 | 24 | height: units.gu(80) | 25 | height: units.gu(80) |
1253 | 26 | |||
1254 | 25 | UnityTestCase { | 27 | UnityTestCase { |
1255 | 26 | name: "GreeterTest" | 28 | name: "GreeterTest" |
1256 | 27 | when: windowShown | 29 | when: windowShown |
1258 | 28 | 30 | ||
1259 | 29 | function test_cycle_data() { | 31 | function test_cycle_data() { |
1260 | 30 | tryCompare(findChild(greeter, "userList"), "count", 5) | 32 | tryCompare(findChild(greeter, "userList"), "count", 5) |
1261 | 31 | var data = new Array() | 33 | var data = new Array() |
1262 | @@ -35,7 +37,7 @@ | |||
1263 | 35 | data[greeter.model.count] = {tag: greeter.model.get(0).name, username: "username0", uid: 0 } | 37 | data[greeter.model.count] = {tag: greeter.model.get(0).name, username: "username0", uid: 0 } |
1264 | 36 | return data | 38 | return data |
1265 | 37 | } | 39 | } |
1267 | 38 | 40 | ||
1268 | 39 | function test_cycle(data) { | 41 | function test_cycle(data) { |
1269 | 40 | tryCompare(findChild(greeter, "userList"), "count", 5) | 42 | tryCompare(findChild(greeter, "userList"), "count", 5) |
1270 | 41 | selectionSpy.clear(); | 43 | selectionSpy.clear(); |
1271 | @@ -46,7 +48,7 @@ | |||
1272 | 46 | tryCompare(greeter, "locked", greeter.model.get(data.uid).password !== undefined) | 48 | tryCompare(greeter, "locked", greeter.model.get(data.uid).password !== undefined) |
1273 | 47 | tryCompare(selectionSpy, "count", 1) | 49 | tryCompare(selectionSpy, "count", 1) |
1274 | 48 | } | 50 | } |
1276 | 49 | 51 | ||
1277 | 50 | function test_unlock_password() { | 52 | function test_unlock_password() { |
1278 | 51 | unlockSpy.clear() | 53 | unlockSpy.clear() |
1279 | 52 | // First one is Lolas account right now. Replace with password protected user from lightdm | 54 | // First one is Lolas account right now. Replace with password protected user from lightdm |
1280 | @@ -93,7 +95,7 @@ | |||
1281 | 93 | compare(unlockSpy.count, 1) | 95 | compare(unlockSpy.count, 1) |
1282 | 94 | } | 96 | } |
1283 | 95 | } | 97 | } |
1285 | 96 | 98 | ||
1286 | 97 | Greeter { | 99 | Greeter { |
1287 | 98 | id: greeter | 100 | id: greeter |
1288 | 99 | anchors.fill: parent | 101 | anchors.fill: parent |
1289 | 100 | 102 | ||
1290 | === added directory 'tests/qmluitests/Hud' | |||
1291 | === added file 'tests/qmluitests/Hud/CMakeLists.txt' | |||
1292 | --- tests/qmluitests/Hud/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1293 | +++ tests/qmluitests/Hud/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
1294 | @@ -0,0 +1,3 @@ | |||
1295 | 1 | add_subdirectory(qml) | ||
1296 | 2 | |||
1297 | 3 | add_qml_test(Hud IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/qml) | ||
1298 | 0 | 4 | ||
1299 | === added directory 'tests/qmluitests/Hud/qml' | |||
1300 | === renamed file 'tests/qmluitests/qml/CMakeLists.txt' => 'tests/qmluitests/Hud/qml/CMakeLists.txt' | |||
1301 | === renamed directory 'tests/qmluitests/qml/HudClient' => 'tests/qmluitests/Hud/qml/HudClient' | |||
1302 | === modified file 'tests/qmluitests/Hud/qml/HudClient/CMakeLists.txt' | |||
1303 | --- tests/qmluitests/qml/HudClient/CMakeLists.txt 2013-03-15 16:49:45 +0000 | |||
1304 | +++ tests/qmluitests/Hud/qml/HudClient/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
1305 | @@ -25,8 +25,8 @@ | |||
1306 | 25 | add_definitions(-DQT_NO_KEYWORDS) | 25 | add_definitions(-DQT_NO_KEYWORDS) |
1307 | 26 | 26 | ||
1308 | 27 | set(HudQML_SOURCES | 27 | set(HudQML_SOURCES |
1311 | 28 | ../../../../plugins/HudClient/hudclient.cpp | 28 | ../../../../../plugins/HudClient/hudclient.cpp |
1312 | 29 | ../../../../plugins/HudClient/volumepeakdetector.cpp | 29 | ../../../../../plugins/HudClient/volumepeakdetector.cpp |
1313 | 30 | fake_hud_plugin.cpp | 30 | fake_hud_plugin.cpp |
1314 | 31 | fake_libhud_client.cpp | 31 | fake_libhud_client.cpp |
1315 | 32 | libhud_client_stub.cpp | 32 | libhud_client_stub.cpp |
1316 | 33 | 33 | ||
1317 | === modified file 'tests/qmluitests/Hud/qml/HudClient/fake_hud_plugin.cpp' | |||
1318 | --- tests/qmluitests/qml/HudClient/fake_hud_plugin.cpp 2013-03-15 16:57:11 +0000 | |||
1319 | +++ tests/qmluitests/Hud/qml/HudClient/fake_hud_plugin.cpp 2013-04-09 10:00:31 +0000 | |||
1320 | @@ -16,8 +16,8 @@ | |||
1321 | 16 | 16 | ||
1322 | 17 | #include "fake_hud_plugin.h" | 17 | #include "fake_hud_plugin.h" |
1323 | 18 | 18 | ||
1326 | 19 | #include "../../../../plugins/HudClient/hudclient.h" | 19 | #include "../../../../../plugins/HudClient/hudclient.h" |
1327 | 20 | #include "../../../../plugins/HudClient/volumepeakdetector.h" | 20 | #include "../../../../../plugins/HudClient/volumepeakdetector.h" |
1328 | 21 | #include "libhud_client_stub.h" | 21 | #include "libhud_client_stub.h" |
1329 | 22 | 22 | ||
1330 | 23 | #include <deelistmodel.h> | 23 | #include <deelistmodel.h> |
1331 | 24 | 24 | ||
1332 | === renamed file 'tests/qmluitests/tst_Hud.qml' => 'tests/qmluitests/Hud/tst_Hud.qml' | |||
1333 | --- tests/qmluitests/tst_Hud.qml 2013-04-02 08:20:21 +0000 | |||
1334 | +++ tests/qmluitests/Hud/tst_Hud.qml 2013-04-09 10:00:31 +0000 | |||
1335 | @@ -16,10 +16,10 @@ | |||
1336 | 16 | 16 | ||
1337 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1338 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
1339 | 19 | import ".." | ||
1340 | 20 | import "../../../Hud" | ||
1341 | 19 | import HudClient 0.1 | 21 | import HudClient 0.1 |
1342 | 20 | 22 | ||
1343 | 21 | import "../../Hud" | ||
1344 | 22 | |||
1345 | 23 | Hud { | 23 | Hud { |
1346 | 24 | id: hud | 24 | id: hud |
1347 | 25 | height: units.gu(80) | 25 | height: units.gu(80) |
1348 | @@ -33,10 +33,6 @@ | |||
1349 | 33 | } | 33 | } |
1350 | 34 | } | 34 | } |
1351 | 35 | 35 | ||
1352 | 36 | HudClientStub { | ||
1353 | 37 | id: hudClientStub | ||
1354 | 38 | } | ||
1355 | 39 | |||
1356 | 40 | UnityTestCase { | 36 | UnityTestCase { |
1357 | 41 | name: "HudTest" | 37 | name: "HudTest" |
1358 | 42 | when: windowShown | 38 | when: windowShown |
1359 | @@ -281,4 +277,8 @@ | |||
1360 | 281 | compare(hudClientStub.lastParametrizedCommandCommited, true, "Confirming does commit") | 277 | compare(hudClientStub.lastParametrizedCommandCommited, true, "Confirming does commit") |
1361 | 282 | } | 278 | } |
1362 | 283 | } | 279 | } |
1363 | 280 | |||
1364 | 281 | HudClientStub { | ||
1365 | 282 | id: hudClientStub | ||
1366 | 283 | } | ||
1367 | 284 | } | 284 | } |
1368 | 285 | 285 | ||
1369 | === added directory 'tests/qmluitests/Launcher' | |||
1370 | === added file 'tests/qmluitests/Launcher/CMakeLists.txt' | |||
1371 | --- tests/qmluitests/Launcher/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1372 | +++ tests/qmluitests/Launcher/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
1373 | @@ -0,0 +1,1 @@ | |||
1374 | 1 | add_qml_test(Launcher) | ||
1375 | 0 | 2 | ||
1376 | === renamed file 'tests/qmluitests/tst_Launcher.qml' => 'tests/qmluitests/Launcher/tst_Launcher.qml' | |||
1377 | --- tests/qmluitests/tst_Launcher.qml 2013-03-28 11:03:01 +0000 | |||
1378 | +++ tests/qmluitests/Launcher/tst_Launcher.qml 2013-04-09 10:00:31 +0000 | |||
1379 | @@ -16,8 +16,9 @@ | |||
1380 | 16 | 16 | ||
1381 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1382 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
1385 | 19 | import "../../Launcher" | 19 | import ".." |
1386 | 20 | import "../../Applications/applications.js" as ApplicationsModel | 20 | import "../../../Launcher" |
1387 | 21 | import "../../../Applications/applications.js" as ApplicationsModel | ||
1388 | 21 | 22 | ||
1389 | 22 | /* Nothing is shown at first. If you drag from left edge you will bring up the | 23 | /* Nothing is shown at first. If you drag from left edge you will bring up the |
1390 | 23 | launcher. */ | 24 | launcher. */ |
1391 | @@ -26,38 +27,9 @@ | |||
1392 | 26 | width: units.gu(50) | 27 | width: units.gu(50) |
1393 | 27 | height: units.gu(81) | 28 | height: units.gu(81) |
1394 | 28 | 29 | ||
1395 | 29 | Launcher { | ||
1396 | 30 | id: launcher | ||
1397 | 31 | x: 0 | ||
1398 | 32 | y: 0 | ||
1399 | 33 | width: units.gu(40) | ||
1400 | 34 | height: units.gu(71) | ||
1401 | 35 | |||
1402 | 36 | favourites: ["/usr/share/applications/phone-app.desktop", | ||
1403 | 37 | "/usr/share/applications/camera-app.desktop", | ||
1404 | 38 | "/usr/share/applications/gallery-app.desktop"] | ||
1405 | 39 | |||
1406 | 40 | shortcutsWidth: units.gu(9) | ||
1407 | 41 | shortcutsThreshold: units.gu(2) | ||
1408 | 42 | iconPath: "graphics/applicationIcons" | ||
1409 | 43 | __dateTime: testCase.fakeDateTime | ||
1410 | 44 | |||
1411 | 45 | property string latestApplicationSelected | ||
1412 | 46 | |||
1413 | 47 | onLauncherApplicationSelected: { | ||
1414 | 48 | latestApplicationSelected = name | ||
1415 | 49 | } | ||
1416 | 50 | |||
1417 | 51 | property int dashItemSelected_count: 0 | ||
1418 | 52 | onDashItemSelected: { | ||
1419 | 53 | dashItemSelected_count++; | ||
1420 | 54 | } | ||
1421 | 55 | |||
1422 | 56 | } | ||
1423 | 57 | |||
1424 | 58 | UnityTestCase { | 30 | UnityTestCase { |
1425 | 59 | id: testCase | 31 | id: testCase |
1427 | 60 | name: "Launcher" | 32 | name: "LauncherTest" |
1428 | 61 | when: windowShown | 33 | when: windowShown |
1429 | 62 | 34 | ||
1430 | 63 | // Drag from the left edge of the screen rightwards and check that the launcher | 35 | // Drag from the left edge of the screen rightwards and check that the launcher |
1431 | @@ -197,7 +169,6 @@ | |||
1432 | 197 | false, /* but do not release yet */ | 169 | false, /* but do not release yet */ |
1433 | 198 | launcher.maxFlickSpeedToLaunchApp*2 /* speed */ ) | 170 | launcher.maxFlickSpeedToLaunchApp*2 /* speed */ ) |
1434 | 199 | 171 | ||
1435 | 200 | |||
1436 | 201 | // wait until it gets fully extended | 172 | // wait until it gets fully extended |
1437 | 202 | tryCompare(shortcuts, "x", 0) | 173 | tryCompare(shortcuts, "x", 0) |
1438 | 203 | 174 | ||
1439 | @@ -243,6 +214,33 @@ | |||
1440 | 243 | var shortcuts = findChild(launcher, "shortcuts") | 214 | var shortcuts = findChild(launcher, "shortcuts") |
1441 | 244 | tryCompare(shortcuts, "x", -shortcuts.width, 1000) | 215 | tryCompare(shortcuts, "x", -shortcuts.width, 1000) |
1442 | 245 | } | 216 | } |
1444 | 246 | 217 | } | |
1445 | 218 | |||
1446 | 219 | Launcher { | ||
1447 | 220 | id: launcher | ||
1448 | 221 | x: 0 | ||
1449 | 222 | y: 0 | ||
1450 | 223 | width: units.gu(40) | ||
1451 | 224 | height: units.gu(71) | ||
1452 | 225 | |||
1453 | 226 | favourites: ["/usr/share/applications/phone-app.desktop", | ||
1454 | 227 | "/usr/share/applications/camera-app.desktop", | ||
1455 | 228 | "/usr/share/applications/gallery-app.desktop"] | ||
1456 | 229 | |||
1457 | 230 | shortcutsWidth: units.gu(9) | ||
1458 | 231 | shortcutsThreshold: units.gu(2) | ||
1459 | 232 | iconPath: "graphics/applicationIcons" | ||
1460 | 233 | __dateTime: testCase.fakeDateTime | ||
1461 | 234 | |||
1462 | 235 | property string latestApplicationSelected | ||
1463 | 236 | |||
1464 | 237 | onLauncherApplicationSelected: { | ||
1465 | 238 | latestApplicationSelected = name | ||
1466 | 239 | } | ||
1467 | 240 | |||
1468 | 241 | property int dashItemSelected_count: 0 | ||
1469 | 242 | onDashItemSelected: { | ||
1470 | 243 | dashItemSelected_count++; | ||
1471 | 244 | } | ||
1472 | 247 | } | 245 | } |
1473 | 248 | } | 246 | } |
1474 | 249 | 247 | ||
1475 | === added directory 'tests/qmluitests/Panel' | |||
1476 | === added file 'tests/qmluitests/Panel/CMakeLists.txt' | |||
1477 | --- tests/qmluitests/Panel/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1478 | +++ tests/qmluitests/Panel/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
1479 | @@ -0,0 +1,2 @@ | |||
1480 | 1 | add_qml_test(IndicatorRow IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/qml) | ||
1481 | 2 | add_qml_test(SearchIndicator) | ||
1482 | 0 | 3 | ||
1483 | === renamed directory 'tests/qmluitests/qml' => 'tests/qmluitests/Panel/qml' | |||
1484 | === renamed file 'tests/qmluitests/tst_IndicatorRow.qml' => 'tests/qmluitests/Panel/tst_IndicatorRow.qml' | |||
1485 | --- tests/qmluitests/tst_IndicatorRow.qml 2013-04-05 12:44:49 +0000 | |||
1486 | +++ tests/qmluitests/Panel/tst_IndicatorRow.qml 2013-04-09 10:00:31 +0000 | |||
1487 | @@ -16,7 +16,8 @@ | |||
1488 | 16 | 16 | ||
1489 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1490 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
1492 | 19 | import "../../Panel" | 19 | import ".." |
1493 | 20 | import "../../../Panel" | ||
1494 | 20 | import Ubuntu.ChewieUI 0.1 as ChewieUI | 21 | import Ubuntu.ChewieUI 0.1 as ChewieUI |
1495 | 21 | 22 | ||
1496 | 22 | /* | 23 | /* |
1497 | @@ -28,24 +29,6 @@ | |||
1498 | 28 | width: units.gu(40) | 29 | width: units.gu(40) |
1499 | 29 | height: units.gu(60) | 30 | height: units.gu(60) |
1500 | 30 | 31 | ||
1501 | 31 | PanelBackground { | ||
1502 | 32 | anchors.fill: indicatorRow | ||
1503 | 33 | } | ||
1504 | 34 | |||
1505 | 35 | IndicatorRow { | ||
1506 | 36 | id: indicatorRow | ||
1507 | 37 | anchors { | ||
1508 | 38 | left: parent.left | ||
1509 | 39 | right: parent.right | ||
1510 | 40 | } | ||
1511 | 41 | |||
1512 | 42 | indicatorsModel: indicatorModel | ||
1513 | 43 | } | ||
1514 | 44 | |||
1515 | 45 | ChewieUI.PluginModel { | ||
1516 | 46 | id: indicatorModel | ||
1517 | 47 | } | ||
1518 | 48 | |||
1519 | 49 | function init_test() | 32 | function init_test() |
1520 | 50 | { | 33 | { |
1521 | 51 | indicatorRow.overviewActive = false; | 34 | indicatorRow.overviewActive = false; |
1522 | @@ -54,7 +37,7 @@ | |||
1523 | 54 | } | 37 | } |
1524 | 55 | 38 | ||
1525 | 56 | UnityTestCase { | 39 | UnityTestCase { |
1527 | 57 | name: "IndicatorRow" | 40 | name: "IndicatorRowTest" |
1528 | 58 | when: windowShown | 41 | when: windowShown |
1529 | 59 | 42 | ||
1530 | 60 | function test_set_current_item() { | 43 | function test_set_current_item() { |
1531 | @@ -71,7 +54,7 @@ | |||
1532 | 71 | } | 54 | } |
1533 | 72 | 55 | ||
1534 | 73 | UnityTestCase { | 56 | UnityTestCase { |
1536 | 74 | name: "IndicatorRow_IconPosition" | 57 | name: "IndicatorRow_IconPositionTest" |
1537 | 75 | when: windowShown | 58 | when: windowShown |
1538 | 76 | 59 | ||
1539 | 77 | function get_indicator_item_at(index) { | 60 | function get_indicator_item_at(index) { |
1540 | @@ -93,7 +76,7 @@ | |||
1541 | 93 | } | 76 | } |
1542 | 94 | 77 | ||
1543 | 95 | UnityTestCase { | 78 | UnityTestCase { |
1545 | 96 | name: "IndicatorRow_Highlight" | 79 | name: "IndicatorRow_HighlightTest" |
1546 | 97 | when: windowShown | 80 | when: windowShown |
1547 | 98 | 81 | ||
1548 | 99 | function get_indicator_item_at(index) { | 82 | function get_indicator_item_at(index) { |
1549 | @@ -167,7 +150,7 @@ | |||
1550 | 167 | } | 150 | } |
1551 | 168 | 151 | ||
1552 | 169 | UnityTestCase { | 152 | UnityTestCase { |
1554 | 170 | name: "IndicatorRow_Dimmed" | 153 | name: "IndicatorRow_DimmedTest" |
1555 | 171 | when: windowShown | 154 | when: windowShown |
1556 | 172 | 155 | ||
1557 | 173 | function get_indicator_item_at(index) { | 156 | function get_indicator_item_at(index) { |
1558 | @@ -253,4 +236,21 @@ | |||
1559 | 253 | } | 236 | } |
1560 | 254 | } | 237 | } |
1561 | 255 | 238 | ||
1562 | 239 | PanelBackground { | ||
1563 | 240 | anchors.fill: indicatorRow | ||
1564 | 241 | } | ||
1565 | 242 | |||
1566 | 243 | IndicatorRow { | ||
1567 | 244 | id: indicatorRow | ||
1568 | 245 | anchors { | ||
1569 | 246 | left: parent.left | ||
1570 | 247 | right: parent.right | ||
1571 | 248 | } | ||
1572 | 249 | |||
1573 | 250 | indicatorsModel: indicatorModel | ||
1574 | 251 | } | ||
1575 | 252 | |||
1576 | 253 | ChewieUI.PluginModel { | ||
1577 | 254 | id: indicatorModel | ||
1578 | 255 | } | ||
1579 | 256 | } | 256 | } |
1580 | 257 | 257 | ||
1581 | === added file 'tests/qmluitests/Panel/tst_SearchIndicator.qml' | |||
1582 | --- tests/qmluitests/Panel/tst_SearchIndicator.qml 1970-01-01 00:00:00 +0000 | |||
1583 | +++ tests/qmluitests/Panel/tst_SearchIndicator.qml 2013-04-09 10:00:31 +0000 | |||
1584 | @@ -0,0 +1,63 @@ | |||
1585 | 1 | /* | ||
1586 | 2 | * Copyright 2013 Canonical Ltd. | ||
1587 | 3 | * | ||
1588 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1589 | 5 | * it under the terms of the GNU General Public License as published by | ||
1590 | 6 | * the Free Software Foundation; version 3. | ||
1591 | 7 | * | ||
1592 | 8 | * This program is distributed in the hope that it will be useful, | ||
1593 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1594 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1595 | 11 | * GNU General Public License for more details. | ||
1596 | 12 | * | ||
1597 | 13 | * You should have received a copy of the GNU General Public License | ||
1598 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1599 | 15 | */ | ||
1600 | 16 | |||
1601 | 17 | import QtQuick 2.0 | ||
1602 | 18 | import QtTest 1.0 | ||
1603 | 19 | import ".." | ||
1604 | 20 | import "../../../Panel" | ||
1605 | 21 | import Ubuntu.Components 0.1 | ||
1606 | 22 | |||
1607 | 23 | Item { | ||
1608 | 24 | width: units.gu(9) | ||
1609 | 25 | height: units.gu(3) | ||
1610 | 26 | |||
1611 | 27 | UnityTestCase { | ||
1612 | 28 | name: "SearchIndicatorTest" | ||
1613 | 29 | when: windowShown | ||
1614 | 30 | |||
1615 | 31 | function test_clickedSignal() { | ||
1616 | 32 | clickedSpy.clear() | ||
1617 | 33 | mouseClick(searchIndicator, | ||
1618 | 34 | searchIndicator.width / 2, searchIndicator.height / 2); | ||
1619 | 35 | compare(clickedSpy.count, 1) | ||
1620 | 36 | } | ||
1621 | 37 | |||
1622 | 38 | function test_hideUp() { | ||
1623 | 39 | var container = findChild(searchIndicator, "container") | ||
1624 | 40 | searchIndicator.hideUp() | ||
1625 | 41 | tryCompare(container, "opacity", 0) | ||
1626 | 42 | tryCompare(container, "y", -container.height) | ||
1627 | 43 | } | ||
1628 | 44 | |||
1629 | 45 | function test_show() { | ||
1630 | 46 | var container = findChild(searchIndicator, "container") | ||
1631 | 47 | searchIndicator.show() | ||
1632 | 48 | tryCompare(container, "opacity", 1) | ||
1633 | 49 | tryCompare(container, "y", 0) | ||
1634 | 50 | } | ||
1635 | 51 | } | ||
1636 | 52 | |||
1637 | 53 | SignalSpy { | ||
1638 | 54 | id: clickedSpy | ||
1639 | 55 | target: searchIndicator | ||
1640 | 56 | signalName: "clicked" | ||
1641 | 57 | } | ||
1642 | 58 | |||
1643 | 59 | SearchIndicator { | ||
1644 | 60 | id: searchIndicator | ||
1645 | 61 | anchors.fill: parent | ||
1646 | 62 | } | ||
1647 | 63 | } | ||
1648 | 0 | 64 | ||
1649 | === modified file 'tests/unittests/CMakeLists.txt' | |||
1650 | --- tests/unittests/CMakeLists.txt 2013-03-27 15:48:19 +0000 | |||
1651 | +++ tests/unittests/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
1652 | @@ -3,9 +3,4 @@ | |||
1653 | 3 | set(qmltest_DEFAULT_TARGETS unittests alltests) | 3 | set(qmltest_DEFAULT_TARGETS unittests alltests) |
1654 | 4 | set(qmltest_DEFAULT_PROPERTIES PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=minimal") | 4 | set(qmltest_DEFAULT_PROPERTIES PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=minimal") |
1655 | 5 | 5 | ||
1662 | 6 | add_qml_test(AnimationControllerWithSignals) | 6 | add_subdirectory(Components) |
1657 | 7 | add_qml_test(Carousel) | ||
1658 | 8 | add_qml_test(CrossFadeImage) | ||
1659 | 9 | add_qml_test(MathLocal) | ||
1660 | 10 | add_qml_test(RatingStars) | ||
1661 | 11 | add_qml_test(TimeLocal) | ||
1663 | 12 | 7 | ||
1664 | === added directory 'tests/unittests/Components' | |||
1665 | === added file 'tests/unittests/Components/CMakeLists.txt' | |||
1666 | --- tests/unittests/Components/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1667 | +++ tests/unittests/Components/CMakeLists.txt 2013-04-09 10:00:31 +0000 | |||
1668 | @@ -0,0 +1,6 @@ | |||
1669 | 1 | add_qml_test(AnimationControllerWithSignals) | ||
1670 | 2 | add_qml_test(Carousel) | ||
1671 | 3 | add_qml_test(CrossFadeImage) | ||
1672 | 4 | add_qml_test(MathLocal) | ||
1673 | 5 | add_qml_test(RatingStars) | ||
1674 | 6 | add_qml_test(TimeLocal) | ||
1675 | 0 | 7 | ||
1676 | === renamed file 'tests/unittests/tst_AnimationControllerWithSignals.qml' => 'tests/unittests/Components/tst_AnimationControllerWithSignals.qml' | |||
1677 | --- tests/unittests/tst_AnimationControllerWithSignals.qml 2013-03-14 12:32:50 +0000 | |||
1678 | +++ tests/unittests/Components/tst_AnimationControllerWithSignals.qml 2013-04-09 10:00:31 +0000 | |||
1679 | @@ -16,14 +16,108 @@ | |||
1680 | 16 | 16 | ||
1681 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1682 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
1684 | 19 | import "../../Components" | 19 | import "../../../Components" |
1685 | 20 | 20 | ||
1686 | 21 | TestCase { | 21 | TestCase { |
1687 | 22 | id: testCase | 22 | id: testCase |
1689 | 23 | name: "AnimationControllerWithSignals" | 23 | name: "AnimationControllerWithSignalsTest" |
1690 | 24 | 24 | ||
1691 | 25 | property real someNumber: 0.0 | 25 | property real someNumber: 0.0 |
1692 | 26 | 26 | ||
1693 | 27 | function test_completeToEndWithSignal() { | ||
1694 | 28 | loader.sourceComponent = testSubjectComponent; | ||
1695 | 29 | var testSubject = loader.item; | ||
1696 | 30 | |||
1697 | 31 | testSubject.animation = someNumberAnimation; | ||
1698 | 32 | testSubject.progress = 0; | ||
1699 | 33 | |||
1700 | 34 | signalSpy.signalName = "animationCompletedAtEnd"; | ||
1701 | 35 | signalSpy.target = testSubject; | ||
1702 | 36 | signalSpy.clear(); | ||
1703 | 37 | |||
1704 | 38 | compare(testSubject.completing, false) | ||
1705 | 39 | compare(testSubject.completed, true) | ||
1706 | 40 | |||
1707 | 41 | testSubject.completeToEndWithSignal(); | ||
1708 | 42 | compare(testSubject.completing, true) | ||
1709 | 43 | compare(testSubject.completed, true) | ||
1710 | 44 | compare(signalSpy.count, 0); | ||
1711 | 45 | |||
1712 | 46 | testSubject.progress = 0.5; | ||
1713 | 47 | compare(testSubject.completing, true) | ||
1714 | 48 | compare(testSubject.completed, false) | ||
1715 | 49 | compare(signalSpy.count, 0); | ||
1716 | 50 | |||
1717 | 51 | testSubject.progress = 1.0; | ||
1718 | 52 | compare(testSubject.completing, false) | ||
1719 | 53 | compare(testSubject.completed, true) | ||
1720 | 54 | compare(signalSpy.count, 1); | ||
1721 | 55 | |||
1722 | 56 | testSubject.animation = null | ||
1723 | 57 | loader.sourceComponent = undefined; | ||
1724 | 58 | } | ||
1725 | 59 | |||
1726 | 60 | function test_completeToBeginningWithSignal() { | ||
1727 | 61 | loader.sourceComponent = testSubjectComponent; | ||
1728 | 62 | var testSubject = loader.item; | ||
1729 | 63 | |||
1730 | 64 | testSubject.animation = someNumberAnimation; | ||
1731 | 65 | testSubject.progress = 1; | ||
1732 | 66 | |||
1733 | 67 | signalSpy.signalName = "animationCompletedAtBeginning"; | ||
1734 | 68 | signalSpy.target = testSubject; | ||
1735 | 69 | signalSpy.clear(); | ||
1736 | 70 | |||
1737 | 71 | compare(testSubject.completing, false) | ||
1738 | 72 | compare(testSubject.completed, true) | ||
1739 | 73 | |||
1740 | 74 | testSubject.completeToBeginningWithSignal(); | ||
1741 | 75 | compare(testSubject.completing, true) | ||
1742 | 76 | compare(testSubject.completed, true) | ||
1743 | 77 | compare(signalSpy.count, 0); | ||
1744 | 78 | |||
1745 | 79 | testSubject.progress = 0.5; | ||
1746 | 80 | compare(testSubject.completing, true) | ||
1747 | 81 | compare(testSubject.completed, false) | ||
1748 | 82 | compare(signalSpy.count, 0); | ||
1749 | 83 | |||
1750 | 84 | testSubject.progress = 0; | ||
1751 | 85 | compare(testSubject.completing, false) | ||
1752 | 86 | compare(testSubject.completed, true) | ||
1753 | 87 | compare(signalSpy.count, 1); | ||
1754 | 88 | |||
1755 | 89 | testSubject.animation = null | ||
1756 | 90 | loader.sourceComponent = undefined; | ||
1757 | 91 | } | ||
1758 | 92 | |||
1759 | 93 | function test_settingProgressWithoutCallingCompleteWithSignal() { | ||
1760 | 94 | loader.sourceComponent = testSubjectComponent; | ||
1761 | 95 | var testSubject = loader.item; | ||
1762 | 96 | |||
1763 | 97 | testSubject.animation = someNumberAnimation; | ||
1764 | 98 | testSubject.progress = 0; | ||
1765 | 99 | |||
1766 | 100 | signalSpy.signalName = "animationCompletedAtEnd"; | ||
1767 | 101 | signalSpy.target = testSubject; | ||
1768 | 102 | signalSpy.clear(); | ||
1769 | 103 | |||
1770 | 104 | compare(testSubject.completing, false) | ||
1771 | 105 | compare(testSubject.completed, true) | ||
1772 | 106 | |||
1773 | 107 | testSubject.progress = 0.5; | ||
1774 | 108 | compare(testSubject.completing, false) | ||
1775 | 109 | compare(testSubject.completed, false) | ||
1776 | 110 | compare(signalSpy.count, 0); | ||
1777 | 111 | |||
1778 | 112 | testSubject.progress = 1; | ||
1779 | 113 | compare(testSubject.completing, false) | ||
1780 | 114 | compare(testSubject.completed, true) | ||
1781 | 115 | compare(signalSpy.count, 0); | ||
1782 | 116 | |||
1783 | 117 | testSubject.animation = null | ||
1784 | 118 | loader.sourceComponent = undefined; | ||
1785 | 119 | } | ||
1786 | 120 | |||
1787 | 27 | NumberAnimation { | 121 | NumberAnimation { |
1788 | 28 | id: someNumberAnimation | 122 | id: someNumberAnimation |
1789 | 29 | target: testCase | 123 | target: testCase |
1790 | @@ -45,99 +139,4 @@ | |||
1791 | 45 | SignalSpy { | 139 | SignalSpy { |
1792 | 46 | id: signalSpy | 140 | id: signalSpy |
1793 | 47 | } | 141 | } |
1794 | 48 | |||
1795 | 49 | function test_completeToEndWithSignal() { | ||
1796 | 50 | loader.sourceComponent = testSubjectComponent; | ||
1797 | 51 | var testSubject = loader.item; | ||
1798 | 52 | |||
1799 | 53 | testSubject.animation = someNumberAnimation; | ||
1800 | 54 | testSubject.progress = 0; | ||
1801 | 55 | |||
1802 | 56 | signalSpy.signalName = "animationCompletedAtEnd"; | ||
1803 | 57 | signalSpy.target = testSubject; | ||
1804 | 58 | signalSpy.clear(); | ||
1805 | 59 | |||
1806 | 60 | compare(testSubject.completing, false) | ||
1807 | 61 | compare(testSubject.completed, true) | ||
1808 | 62 | |||
1809 | 63 | testSubject.completeToEndWithSignal(); | ||
1810 | 64 | compare(testSubject.completing, true) | ||
1811 | 65 | compare(testSubject.completed, true) | ||
1812 | 66 | compare(signalSpy.count, 0); | ||
1813 | 67 | |||
1814 | 68 | testSubject.progress = 0.5; | ||
1815 | 69 | compare(testSubject.completing, true) | ||
1816 | 70 | compare(testSubject.completed, false) | ||
1817 | 71 | compare(signalSpy.count, 0); | ||
1818 | 72 | |||
1819 | 73 | testSubject.progress = 1.0; | ||
1820 | 74 | compare(testSubject.completing, false) | ||
1821 | 75 | compare(testSubject.completed, true) | ||
1822 | 76 | compare(signalSpy.count, 1); | ||
1823 | 77 | |||
1824 | 78 | testSubject.animation = null | ||
1825 | 79 | loader.sourceComponent = undefined; | ||
1826 | 80 | } | ||
1827 | 81 | |||
1828 | 82 | function test_completeToBeginningWithSignal() { | ||
1829 | 83 | loader.sourceComponent = testSubjectComponent; | ||
1830 | 84 | var testSubject = loader.item; | ||
1831 | 85 | |||
1832 | 86 | testSubject.animation = someNumberAnimation; | ||
1833 | 87 | testSubject.progress = 1; | ||
1834 | 88 | |||
1835 | 89 | signalSpy.signalName = "animationCompletedAtBeginning"; | ||
1836 | 90 | signalSpy.target = testSubject; | ||
1837 | 91 | signalSpy.clear(); | ||
1838 | 92 | |||
1839 | 93 | compare(testSubject.completing, false) | ||
1840 | 94 | compare(testSubject.completed, true) | ||
1841 | 95 | |||
1842 | 96 | testSubject.completeToBeginningWithSignal(); | ||
1843 | 97 | compare(testSubject.completing, true) | ||
1844 | 98 | compare(testSubject.completed, true) | ||
1845 | 99 | compare(signalSpy.count, 0); | ||
1846 | 100 | |||
1847 | 101 | testSubject.progress = 0.5; | ||
1848 | 102 | compare(testSubject.completing, true) | ||
1849 | 103 | compare(testSubject.completed, false) | ||
1850 | 104 | compare(signalSpy.count, 0); | ||
1851 | 105 | |||
1852 | 106 | testSubject.progress = 0; | ||
1853 | 107 | compare(testSubject.completing, false) | ||
1854 | 108 | compare(testSubject.completed, true) | ||
1855 | 109 | compare(signalSpy.count, 1); | ||
1856 | 110 | |||
1857 | 111 | testSubject.animation = null | ||
1858 | 112 | loader.sourceComponent = undefined; | ||
1859 | 113 | } | ||
1860 | 114 | |||
1861 | 115 | function test_settingProgressWithoutCallingCompleteWithSignal() { | ||
1862 | 116 | loader.sourceComponent = testSubjectComponent; | ||
1863 | 117 | var testSubject = loader.item; | ||
1864 | 118 | |||
1865 | 119 | testSubject.animation = someNumberAnimation; | ||
1866 | 120 | testSubject.progress = 0; | ||
1867 | 121 | |||
1868 | 122 | signalSpy.signalName = "animationCompletedAtEnd"; | ||
1869 | 123 | signalSpy.target = testSubject; | ||
1870 | 124 | signalSpy.clear(); | ||
1871 | 125 | |||
1872 | 126 | compare(testSubject.completing, false) | ||
1873 | 127 | compare(testSubject.completed, true) | ||
1874 | 128 | |||
1875 | 129 | testSubject.progress = 0.5; | ||
1876 | 130 | compare(testSubject.completing, false) | ||
1877 | 131 | compare(testSubject.completed, false) | ||
1878 | 132 | compare(signalSpy.count, 0); | ||
1879 | 133 | |||
1880 | 134 | testSubject.progress = 1; | ||
1881 | 135 | compare(testSubject.completing, false) | ||
1882 | 136 | compare(testSubject.completed, true) | ||
1883 | 137 | compare(signalSpy.count, 0); | ||
1884 | 138 | |||
1885 | 139 | testSubject.animation = null | ||
1886 | 140 | loader.sourceComponent = undefined; | ||
1887 | 141 | } | ||
1888 | 142 | } | 142 | } |
1889 | 143 | |||
1890 | 144 | 143 | ||
1891 | === renamed file 'tests/unittests/tst_Carousel.qml' => 'tests/unittests/Components/tst_Carousel.qml' | |||
1892 | --- tests/unittests/tst_Carousel.qml 2013-03-28 09:50:26 +0000 | |||
1893 | +++ tests/unittests/Components/tst_Carousel.qml 2013-04-09 10:00:31 +0000 | |||
1894 | @@ -16,7 +16,7 @@ | |||
1895 | 16 | 16 | ||
1896 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1897 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
1899 | 19 | import "../../Components/carousel.js" as Carousel | 19 | import "../../../Components/carousel.js" as Carousel |
1900 | 20 | 20 | ||
1901 | 21 | TestCase { | 21 | TestCase { |
1902 | 22 | name: "CarouselTest" | 22 | name: "CarouselTest" |
1903 | 23 | 23 | ||
1904 | === renamed file 'tests/unittests/tst_CrossFadeImage.qml' => 'tests/unittests/Components/tst_CrossFadeImage.qml' | |||
1905 | --- tests/unittests/tst_CrossFadeImage.qml 2013-03-13 22:58:26 +0000 | |||
1906 | +++ tests/unittests/Components/tst_CrossFadeImage.qml 2013-04-09 10:00:31 +0000 | |||
1907 | @@ -16,7 +16,7 @@ | |||
1908 | 16 | 16 | ||
1909 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1910 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
1912 | 19 | import "../../Components" | 19 | import "../../../Components" |
1913 | 20 | 20 | ||
1914 | 21 | TestCase { | 21 | TestCase { |
1915 | 22 | name: "CrossFadeImageTest" | 22 | name: "CrossFadeImageTest" |
1916 | @@ -33,11 +33,11 @@ | |||
1917 | 33 | fadeInFirst = argFadeInFirst | 33 | fadeInFirst = argFadeInFirst |
1918 | 34 | compare(status, Image.Null, "Could not reset CrossFadeImage") | 34 | compare(status, Image.Null, "Could not reset CrossFadeImage") |
1919 | 35 | } | 35 | } |
1921 | 36 | 36 | ||
1922 | 37 | function loadImage(url) { | 37 | function loadImage(url) { |
1923 | 38 | console.log("Loading image...") | 38 | console.log("Loading image...") |
1924 | 39 | source = url | 39 | source = url |
1926 | 40 | 40 | ||
1927 | 41 | signalSpy.signalName = "statusChanged" | 41 | signalSpy.signalName = "statusChanged" |
1928 | 42 | signalSpy.wait() | 42 | signalSpy.wait() |
1929 | 43 | 43 | ||
1930 | @@ -45,7 +45,7 @@ | |||
1931 | 45 | signalSpy.clear() | 45 | signalSpy.clear() |
1932 | 46 | signalSpy.wait() | 46 | signalSpy.wait() |
1933 | 47 | } | 47 | } |
1935 | 48 | 48 | ||
1936 | 49 | if (status == Image.Loading) { | 49 | if (status == Image.Loading) { |
1937 | 50 | signalSpy.clear() | 50 | signalSpy.clear() |
1938 | 51 | signalSpy.wait() | 51 | signalSpy.wait() |
1939 | @@ -54,7 +54,7 @@ | |||
1940 | 54 | compare(status, Image.Ready, "Image not ready") | 54 | compare(status, Image.Ready, "Image not ready") |
1941 | 55 | console.log("Image loaded.") | 55 | console.log("Image loaded.") |
1942 | 56 | } | 56 | } |
1944 | 57 | 57 | ||
1945 | 58 | function waitForAnimation() { | 58 | function waitForAnimation() { |
1946 | 59 | signalSpy.signalName = "runningChanged" | 59 | signalSpy.signalName = "runningChanged" |
1947 | 60 | 60 | ||
1948 | @@ -63,7 +63,7 @@ | |||
1949 | 63 | signalSpy.wait() | 63 | signalSpy.wait() |
1950 | 64 | compare(running, true, "Animation did not start") | 64 | compare(running, true, "Animation did not start") |
1951 | 65 | } | 65 | } |
1953 | 66 | 66 | ||
1954 | 67 | signalSpy.clear() | 67 | signalSpy.clear() |
1955 | 68 | console.log("Waiting for animation to finish...") | 68 | console.log("Waiting for animation to finish...") |
1956 | 69 | signalSpy.wait() | 69 | signalSpy.wait() |
1957 | @@ -74,31 +74,31 @@ | |||
1958 | 74 | compare(running, false, "Animation is running after testcase") | 74 | compare(running, false, "Animation is running after testcase") |
1959 | 75 | compare(crossFadeImage.__nextImage.source, "", "nextimage source is not reset") | 75 | compare(crossFadeImage.__nextImage.source, "", "nextimage source is not reset") |
1960 | 76 | } | 76 | } |
1962 | 77 | 77 | ||
1963 | 78 | function test_fadeFirst() { | 78 | function test_fadeFirst() { |
1964 | 79 | initTestFunction(true, true) | 79 | initTestFunction(true, true) |
1965 | 80 | 80 | ||
1967 | 81 | loadImage("../../graphics/phone_background.jpg") | 81 | loadImage("../../../graphics/phone_background.jpg") |
1968 | 82 | 82 | ||
1969 | 83 | waitForAnimation() | 83 | waitForAnimation() |
1971 | 84 | 84 | ||
1972 | 85 | cleanupTest() | 85 | cleanupTest() |
1973 | 86 | } | 86 | } |
1974 | 87 | 87 | ||
1975 | 88 | function test_no_fadeFirst() { | 88 | function test_no_fadeFirst() { |
1976 | 89 | initTestFunction(true, false) | 89 | initTestFunction(true, false) |
1980 | 90 | 90 | ||
1981 | 91 | loadImage("../../graphics/phone_background.jpg") | 91 | loadImage("../../../graphics/phone_background.jpg") |
1982 | 92 | 92 | ||
1983 | 93 | cleanupTest() | 93 | cleanupTest() |
1984 | 94 | } | 94 | } |
1986 | 95 | 95 | ||
1987 | 96 | function test_crossFade() { | 96 | function test_crossFade() { |
1988 | 97 | initTestFunction(true, false) | 97 | initTestFunction(true, false) |
1989 | 98 | 98 | ||
1993 | 99 | loadImage("../../graphics/phone_background.jpg") | 99 | loadImage("../../../graphics/phone_background.jpg") |
1994 | 100 | 100 | ||
1995 | 101 | loadImage("../../graphics/tablet_background.jpg") | 101 | loadImage("../../../graphics/tablet_background.jpg") |
1996 | 102 | 102 | ||
1997 | 103 | // Due to the internal implementation, __currentImage and __nextImage are swapped before the animation starts | 103 | // Due to the internal implementation, __currentImage and __nextImage are swapped before the animation starts |
1998 | 104 | // Make sure z order reflects that too. | 104 | // Make sure z order reflects that too. |
1999 | @@ -107,12 +107,11 @@ | |||
2000 | 107 | compare(crossFadeImage.__nextImage.opacity > 0.5, true) | 107 | compare(crossFadeImage.__nextImage.opacity > 0.5, true) |
2001 | 108 | 108 | ||
2002 | 109 | waitForAnimation() | 109 | waitForAnimation() |
2004 | 110 | 110 | ||
2005 | 111 | compare(crossFadeImage.__currentImage.opacity > 0.5, true) | 111 | compare(crossFadeImage.__currentImage.opacity > 0.5, true) |
2006 | 112 | compare(crossFadeImage.__nextImage.opacity < 0.5, true) | 112 | compare(crossFadeImage.__nextImage.opacity < 0.5, true) |
2008 | 113 | 113 | ||
2009 | 114 | cleanupTest() | 114 | cleanupTest() |
2010 | 115 | |||
2011 | 116 | } | 115 | } |
2012 | 117 | 116 | ||
2013 | 118 | CrossFadeImage { | 117 | CrossFadeImage { |
2014 | 119 | 118 | ||
2015 | === renamed file 'tests/unittests/tst_MathLocal.qml' => 'tests/unittests/Components/tst_MathLocal.qml' | |||
2016 | --- tests/unittests/tst_MathLocal.qml 2013-02-27 20:06:20 +0000 | |||
2017 | +++ tests/unittests/Components/tst_MathLocal.qml 2013-04-09 10:00:31 +0000 | |||
2018 | @@ -16,7 +16,7 @@ | |||
2019 | 16 | 16 | ||
2020 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
2021 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
2023 | 19 | import "../../Components/Math.js" as MathLocal | 19 | import "../../../Components/Math.js" as MathLocal |
2024 | 20 | 20 | ||
2025 | 21 | TestCase { | 21 | TestCase { |
2026 | 22 | name: "MathLocalTest" | 22 | name: "MathLocalTest" |
2027 | 23 | 23 | ||
2028 | === renamed file 'tests/unittests/tst_RatingStars.qml' => 'tests/unittests/Components/tst_RatingStars.qml' | |||
2029 | --- tests/unittests/tst_RatingStars.qml 2013-02-27 20:06:20 +0000 | |||
2030 | +++ tests/unittests/Components/tst_RatingStars.qml 2013-04-09 10:00:31 +0000 | |||
2031 | @@ -16,7 +16,7 @@ | |||
2032 | 16 | 16 | ||
2033 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
2034 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
2036 | 19 | import "../../Components" | 19 | import "../../../Components" |
2037 | 20 | 20 | ||
2038 | 21 | TestCase { | 21 | TestCase { |
2039 | 22 | name: "RatingStarsTest" | 22 | name: "RatingStarsTest" |
2040 | 23 | 23 | ||
2041 | === renamed file 'tests/unittests/tst_TimeLocal.qml' => 'tests/unittests/Components/tst_TimeLocal.qml' | |||
2042 | --- tests/unittests/tst_TimeLocal.qml 2013-03-11 13:07:33 +0000 | |||
2043 | +++ tests/unittests/Components/tst_TimeLocal.qml 2013-04-09 10:00:31 +0000 | |||
2044 | @@ -16,7 +16,7 @@ | |||
2045 | 16 | 16 | ||
2046 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
2047 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
2049 | 19 | import "../../Components/Time.js" as TimeLocal | 19 | import "../../../Components/Time.js" as TimeLocal |
2050 | 20 | 20 | ||
2051 | 21 | TestCase { | 21 | TestCase { |
2052 | 22 | name: "TimeLocalTest" | 22 | name: "TimeLocalTest" |
FAILED: Continuous integration, rev:554 jenkins. qa.ubuntu. com/job/ unity-phablet- ci/328/ s-jenkins: 8080/job/ unity-phablet- qmluitests/ 60/console jenkins. qa.ubuntu. com/job/ unity-phablet- quantal- armhf-ci/ 329/console jenkins. qa.ubuntu. com/job/ unity-phablet- quantal- i386-ci/ 328/console jenkins. qa.ubuntu. com/job/ unity-phablet- raring- armhf-ci/ 204/console jenkins. qa.ubuntu. com/job/ unity-phablet- raring- i386-ci/ 204/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ unity-phablet- ci/328/ rebuild
http://