Merge lp:~josharenson/unity8/autoscroller-alternative into lp:unity8
- autoscroller-alternative
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Andrea Cimitan |
Approved revision: | 2666 |
Merged at revision: | 2762 |
Proposed branch: | lp:~josharenson/unity8/autoscroller-alternative |
Merge into: | lp:unity8 |
Diff against target: |
326 lines (+140/-48) 6 files modified
qml/Dash/ScopesList.qml (+120/-39) qml/Dash/ScopesListCategory.qml (+3/-0) tests/mocks/Unity/fake_scopes.cpp (+7/-0) tests/qmltests/Dash/tst_Dash.qml (+6/-5) tests/qmltests/Dash/tst_DashContent.qml (+3/-3) tests/qmltests/Dash/tst_DashShell.qml (+1/-1) |
To merge this branch: | bzr merge lp:~josharenson/unity8/autoscroller-alternative |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Approve | |
Andrea Cimitan (community) | Approve | ||
Review via email: mp+311207@code.launchpad.net |
Commit message
Allow the scopes list to automatically scroll when a scope is being dragged past the bounds of the screen.
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
lp:~josharenson/unity-scopes-shell/fix-overview-results-sorting which fixes lp:1646947
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes.
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
* If you changed the UI, has there been a design review?
There has not.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
- 2661. By Josh Arenson
-
Fix content tests
- 2662. By Josh Arenson
-
Fix dash tests
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2662
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2662
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2663. By Josh Arenson
-
Fix warnings and cleanup
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2663
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2664. By Josh Arenson
-
Merge trunk
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2664
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2664
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2665. By Josh Arenson
-
Merge trunk
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2665
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2665
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Andrea Cimitan (cimi) wrote : | # |
Triggered a rebuild
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2665
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
Text conflict in tests/qmltests/
1 conflicts encountered.
Albert Astals Cid (aacid) wrote : | # |
Text conflict in tests/qmltests/
1 conflicts encountered.
- 2666. By Josh Arenson
-
Merge trunk
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2666
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Andrea Cimitan (cimi) wrote : | # |
I cannot reproduce this test failure locally, so I assume it was unrelated
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2666
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'qml/Dash/ScopesList.qml' | |||
2 | --- qml/Dash/ScopesList.qml 2016-07-27 16:23:18 +0000 | |||
3 | +++ qml/Dash/ScopesList.qml 2017-01-03 17:43:44 +0000 | |||
4 | @@ -22,6 +22,8 @@ | |||
5 | 22 | Item { | 22 | Item { |
6 | 23 | id: root | 23 | id: root |
7 | 24 | 24 | ||
8 | 25 | property alias scopesListFlickable: scopesListFlickable | ||
9 | 26 | |||
10 | 25 | // Properties set by parent | 27 | // Properties set by parent |
11 | 26 | property var scope: null | 28 | property var scope: null |
12 | 27 | 29 | ||
13 | @@ -35,10 +37,97 @@ | |||
14 | 35 | signal requestFavoriteMoveTo(string scopeId, int index) | 37 | signal requestFavoriteMoveTo(string scopeId, int index) |
15 | 36 | signal requestRestore(string scopeId) | 38 | signal requestRestore(string scopeId) |
16 | 37 | 39 | ||
17 | 40 | Item { | ||
18 | 41 | id: autoscroller | ||
19 | 42 | |||
20 | 43 | property bool dragging: false | ||
21 | 44 | property var dragItem: new Object(); | ||
22 | 45 | |||
23 | 46 | readonly property bool fuzzyAtYEnd: { | ||
24 | 47 | var contentHeight = root.scopesListFlickable.contentHeight | ||
25 | 48 | var contentY = root.scopesListFlickable.contentY | ||
26 | 49 | var dragItemHeight = dragItem ? autoscroller.dragItem.height : 0 | ||
27 | 50 | var flickableHeight = root.scopesListFlickable.height | ||
28 | 51 | |||
29 | 52 | if (!dragItem) { | ||
30 | 53 | return true; | ||
31 | 54 | } else { | ||
32 | 55 | return contentY >= (contentHeight - flickableHeight) - dragItemHeight | ||
33 | 56 | } | ||
34 | 57 | } | ||
35 | 58 | |||
36 | 59 | readonly property real bottomBoundary: { | ||
37 | 60 | var contentHeight = root.scopesListFlickable.contentHeight | ||
38 | 61 | var contentY = root.scopesListFlickable.contentY | ||
39 | 62 | var dragItemHeight = dragItem ? autoscroller.dragItem.height : 0 | ||
40 | 63 | var heightRatio = root.scopesListFlickable.visibleArea.heightRatio | ||
41 | 64 | |||
42 | 65 | if (!dragItem) { | ||
43 | 66 | return true; | ||
44 | 67 | } else { | ||
45 | 68 | return (heightRatio * contentHeight) - | ||
46 | 69 | (1.5 * dragItemHeight) + contentY | ||
47 | 70 | } | ||
48 | 71 | } | ||
49 | 72 | |||
50 | 73 | readonly property int delayMs: 32 | ||
51 | 74 | readonly property real topBoundary: dragItem ? root.scopesListFlickable.contentY + (.5 * dragItem.height) : 0 | ||
52 | 75 | |||
53 | 76 | visible: false | ||
54 | 77 | readonly property real maxStep: units.dp(10) | ||
55 | 78 | function stepSize(scrollingUp) { | ||
56 | 79 | var delta, step; | ||
57 | 80 | if (scrollingUp) { | ||
58 | 81 | delta = dragItem.y - topBoundary; | ||
59 | 82 | delta /= (1.5 * dragItem.height); | ||
60 | 83 | } else { | ||
61 | 84 | delta = dragItem.y - bottomBoundary; | ||
62 | 85 | delta /= (1.5 * dragItem.height); | ||
63 | 86 | } | ||
64 | 87 | |||
65 | 88 | step = Math.abs(delta) * autoscroller.maxStep | ||
66 | 89 | return Math.ceil(step); | ||
67 | 90 | } | ||
68 | 91 | |||
69 | 92 | |||
70 | 93 | Timer { | ||
71 | 94 | interval: autoscroller.delayMs | ||
72 | 95 | running: autoscroller.dragItem ? (autoscroller.dragging && | ||
73 | 96 | autoscroller.dragItem.y < autoscroller.topBoundary && | ||
74 | 97 | !root.scopesListFlickable.atYBeginning) : false | ||
75 | 98 | repeat: true | ||
76 | 99 | onTriggered: { | ||
77 | 100 | root.scopesListFlickable.contentY -= autoscroller.stepSize(true); | ||
78 | 101 | autoscroller.dragItem.y -= autoscroller.stepSize(true); | ||
79 | 102 | } | ||
80 | 103 | } | ||
81 | 104 | |||
82 | 105 | Timer { | ||
83 | 106 | interval: autoscroller.delayMs | ||
84 | 107 | running: autoscroller.dragItem ? (autoscroller.dragging && | ||
85 | 108 | autoscroller.dragItem.y >= autoscroller.bottomBoundary && | ||
86 | 109 | !autoscroller.fuzzyAtYEnd) : false | ||
87 | 110 | repeat: true | ||
88 | 111 | onTriggered: { | ||
89 | 112 | root.scopesListFlickable.contentY += autoscroller.stepSize(false); | ||
90 | 113 | autoscroller.dragItem.y += autoscroller.stepSize(false); | ||
91 | 114 | } | ||
92 | 115 | } | ||
93 | 116 | } | ||
94 | 117 | |||
95 | 118 | function autoscroll(dragging, dragItem) { | ||
96 | 119 | if (dragging) { | ||
97 | 120 | autoscroller.dragItem = dragItem | ||
98 | 121 | autoscroller.dragging = true; | ||
99 | 122 | } else { | ||
100 | 123 | autoscroller.dragItem = null; | ||
101 | 124 | autoscroller.dragging = false | ||
102 | 125 | } | ||
103 | 126 | } | ||
104 | 127 | |||
105 | 38 | state: "browse" | 128 | state: "browse" |
106 | 39 | 129 | ||
109 | 40 | property var scopeStyle: ScopeStyle { | 130 | property var scopeStyle: ScopeStyle {} |
108 | 41 | } | ||
110 | 42 | 131 | ||
111 | 43 | onStateChanged: { | 132 | onStateChanged: { |
112 | 44 | if (state == "edit") { | 133 | if (state == "edit") { |
113 | @@ -73,7 +162,8 @@ | |||
114 | 73 | z: 1 | 162 | z: 1 |
115 | 74 | } | 163 | } |
116 | 75 | 164 | ||
118 | 76 | Flickable { | 165 | ListView { |
119 | 166 | id: scopesListFlickable | ||
120 | 77 | objectName: "scopesListFlickable" | 167 | objectName: "scopesListFlickable" |
121 | 78 | anchors { | 168 | anchors { |
122 | 79 | top: header.bottom | 169 | top: header.bottom |
123 | @@ -82,43 +172,34 @@ | |||
124 | 82 | right: parent.right | 172 | right: parent.right |
125 | 83 | } | 173 | } |
126 | 84 | clip: true | 174 | clip: true |
162 | 85 | contentWidth: root.width | 175 | model: scope ? scope.categories : null |
163 | 86 | contentHeight: column.height | 176 | delegate: Loader { |
164 | 87 | onContentHeightChanged: returnToBounds(); | 177 | asynchronous: true |
165 | 88 | Column { | 178 | width: root.width |
166 | 89 | id: column | 179 | active: results.count > 0 |
167 | 90 | Repeater { | 180 | visible: active |
168 | 91 | model: scope ? scope.categories : null | 181 | sourceComponent: ScopesListCategory { |
169 | 92 | 182 | objectName: "scopesListCategory" + categoryId | |
170 | 93 | delegate: Loader { | 183 | |
171 | 94 | asynchronous: true | 184 | model: results |
172 | 95 | width: root.width | 185 | |
173 | 96 | active: results.count > 0 | 186 | title: { |
174 | 97 | visible: active | 187 | if (isFavoritesFeed) return i18n.tr("Home"); |
175 | 98 | sourceComponent: ScopesListCategory { | 188 | else if (isAlsoInstalled) return i18n.tr("Also installed"); |
176 | 99 | objectName: "scopesListCategory" + categoryId | 189 | else return name; |
142 | 100 | |||
143 | 101 | model: results | ||
144 | 102 | |||
145 | 103 | title: { | ||
146 | 104 | if (isFavoritesFeed) return i18n.tr("Home"); | ||
147 | 105 | else if (isAlsoInstalled) return i18n.tr("Also installed"); | ||
148 | 106 | else return name; | ||
149 | 107 | } | ||
150 | 108 | |||
151 | 109 | editMode: root.state == "edit" | ||
152 | 110 | |||
153 | 111 | scopeStyle: root.scopeStyle | ||
154 | 112 | isFavoritesFeed: categoryId == "favorites" | ||
155 | 113 | isAlsoInstalled: categoryId == "other" | ||
156 | 114 | |||
157 | 115 | onRequestFavorite: root.requestFavorite(scopeId, favorite); | ||
158 | 116 | onRequestEditMode: root.state = "edit"; | ||
159 | 117 | onRequestScopeMoveTo: root.requestFavoriteMoveTo(scopeId, index); | ||
160 | 118 | onRequestActivate: root.scope.activate(result, categoryId); | ||
161 | 119 | onRequestRestore: root.requestRestore(scopeId); | ||
177 | 120 | } | 190 | } |
179 | 121 | } | 191 | |
180 | 192 | editMode: root.state == "edit" | ||
181 | 193 | scopeStyle: root.scopeStyle | ||
182 | 194 | isFavoritesFeed: categoryId == "favorites" | ||
183 | 195 | isAlsoInstalled: categoryId == "other" | ||
184 | 196 | |||
185 | 197 | onItemDragging: autoscroll(dragging, dragItem); | ||
186 | 198 | onRequestFavorite: root.requestFavorite(scopeId, favorite); | ||
187 | 199 | onRequestEditMode: root.state = "edit"; | ||
188 | 200 | onRequestScopeMoveTo: root.requestFavoriteMoveTo(scopeId, index); | ||
189 | 201 | onRequestActivate: root.scope.activate(result, categoryId); | ||
190 | 202 | onRequestRestore: root.requestRestore(scopeId); | ||
191 | 122 | } | 203 | } |
192 | 123 | } | 204 | } |
193 | 124 | } | 205 | } |
194 | 125 | 206 | ||
195 | === modified file 'qml/Dash/ScopesListCategory.qml' | |||
196 | --- qml/Dash/ScopesListCategory.qml 2016-10-04 09:32:15 +0000 | |||
197 | +++ qml/Dash/ScopesListCategory.qml 2017-01-03 17:43:44 +0000 | |||
198 | @@ -32,6 +32,7 @@ | |||
199 | 32 | 32 | ||
200 | 33 | visible: !editMode || isFavoritesFeed | 33 | visible: !editMode || isFavoritesFeed |
201 | 34 | 34 | ||
202 | 35 | signal itemDragging(bool dragging, var dragItem) | ||
203 | 35 | signal requestFavorite(string scopeId, bool favorite) | 36 | signal requestFavorite(string scopeId, bool favorite) |
204 | 36 | signal requestEditMode() | 37 | signal requestEditMode() |
205 | 37 | signal requestScopeMoveTo(string scopeId, int index) | 38 | signal requestScopeMoveTo(string scopeId, int index) |
206 | @@ -109,6 +110,7 @@ | |||
207 | 109 | onRequestFavorite: root.requestFavorite(model.scopeId, favorite); | 110 | onRequestFavorite: root.requestFavorite(model.scopeId, favorite); |
208 | 110 | onHandlePressed: { | 111 | onHandlePressed: { |
209 | 111 | if (editMode) { | 112 | if (editMode) { |
210 | 113 | root.itemDragging(true, dragItem); | ||
211 | 112 | handle.drag.target = dragItem; | 114 | handle.drag.target = dragItem; |
212 | 113 | handle.drag.maximumX = units.gu(1); | 115 | handle.drag.maximumX = units.gu(1); |
213 | 114 | handle.drag.minimumX = units.gu(1); | 116 | handle.drag.minimumX = units.gu(1); |
214 | @@ -126,6 +128,7 @@ | |||
215 | 126 | } | 128 | } |
216 | 127 | } | 129 | } |
217 | 128 | onHandleReleased: { | 130 | onHandleReleased: { |
218 | 131 | root.itemDragging(false, dragItem); | ||
219 | 129 | if (dragItem.visible) { | 132 | if (dragItem.visible) { |
220 | 130 | handle.drag.target = undefined; | 133 | handle.drag.target = undefined; |
221 | 131 | dragItem.visible = false; | 134 | dragItem.visible = false; |
222 | 132 | 135 | ||
223 | === modified file 'tests/mocks/Unity/fake_scopes.cpp' | |||
224 | --- tests/mocks/Unity/fake_scopes.cpp 2016-06-07 03:33:35 +0000 | |||
225 | +++ tests/mocks/Unity/fake_scopes.cpp 2017-01-03 17:43:44 +0000 | |||
226 | @@ -73,6 +73,13 @@ | |||
227 | 73 | addScope(longNavigationScope); | 73 | addScope(longNavigationScope); |
228 | 74 | 74 | ||
229 | 75 | addScope(new Scope("NullPreviewScope", "NPS", false, this, 1, true)); | 75 | addScope(new Scope("NullPreviewScope", "NPS", false, this, 1, true)); |
230 | 76 | |||
231 | 77 | // Add enough scopes to test autoscrolling on the scopes managment page | ||
232 | 78 | for (int i = 0; i < 20; i++) { | ||
233 | 79 | addScope(new Scope("UselessScope" + QString::number(i), | ||
234 | 80 | "US" + QString::number(i), true, this)); | ||
235 | 81 | } | ||
236 | 82 | |||
237 | 76 | m_scopesOverview = new ScopesOverview(this); | 83 | m_scopesOverview = new ScopesOverview(this); |
238 | 77 | 84 | ||
239 | 78 | if (!m_loaded) { | 85 | if (!m_loaded) { |
240 | 79 | 86 | ||
241 | === modified file 'tests/qmltests/Dash/tst_Dash.qml' | |||
242 | --- tests/qmltests/Dash/tst_Dash.qml 2016-11-21 14:10:08 +0000 | |||
243 | +++ tests/qmltests/Dash/tst_Dash.qml 2017-01-03 17:43:44 +0000 | |||
244 | @@ -58,7 +58,7 @@ | |||
245 | 58 | tryCompare(dashContentList, "count", 0); | 58 | tryCompare(dashContentList, "count", 0); |
246 | 59 | scopes.load(); | 59 | scopes.load(); |
247 | 60 | tryCompare(dashContentList, "currentIndex", 0); | 60 | tryCompare(dashContentList, "currentIndex", 0); |
249 | 61 | tryCompare(dashContentList, "count", 8); | 61 | tryCompare(dashContentList, "count", 28); |
250 | 62 | tryCompare(scopes, "loaded", true); | 62 | tryCompare(scopes, "loaded", true); |
251 | 63 | tryCompareFunction(function() { | 63 | tryCompareFunction(function() { |
252 | 64 | var mockScope1Loader = findChild(dash, "scopeLoader0"); | 64 | var mockScope1Loader = findChild(dash, "scopeLoader0"); |
253 | @@ -589,10 +589,10 @@ | |||
254 | 589 | 589 | ||
255 | 590 | // Go to a temp scope | 590 | // Go to a temp scope |
256 | 591 | open_manage_dash(); | 591 | open_manage_dash(); |
257 | 592 | flickToYEnd(findChild(dash, "scopesListFlickable")); | ||
258 | 592 | 593 | ||
259 | 593 | var nonfavScopesListCategory = findChild(dash, "scopesListCategoryother"); | 594 | var nonfavScopesListCategory = findChild(dash, "scopesListCategoryother"); |
260 | 594 | var nonfavScopesListCategoryList = findChild(nonfavScopesListCategory, "scopesListCategoryInnerList"); | 595 | var nonfavScopesListCategoryList = findChild(nonfavScopesListCategory, "scopesListCategoryInnerList"); |
261 | 595 | flickToYEnd(findChild(dash, "scopesListFlickable")); | ||
262 | 596 | tryCompare(nonfavScopesListCategoryList, "currentIndex", 0); | 596 | tryCompare(nonfavScopesListCategoryList, "currentIndex", 0); |
263 | 597 | mouseClick(nonfavScopesListCategoryList.currentItem); | 597 | mouseClick(nonfavScopesListCategoryList.currentItem); |
264 | 598 | var dashTempScopeItem = findChild(dash, "dashTempScopeItem"); | 598 | var dashTempScopeItem = findChild(dash, "dashTempScopeItem"); |
265 | @@ -661,13 +661,14 @@ | |||
266 | 661 | // Go to a temp scope | 661 | // Go to a temp scope |
267 | 662 | open_manage_dash(); | 662 | open_manage_dash(); |
268 | 663 | 663 | ||
269 | 664 | var nonfavScopesListCategory = findChild(dash, "scopesListCategoryother"); | ||
270 | 665 | var nonfavScopesListCategoryList = findChild(nonfavScopesListCategory, "scopesListCategoryInnerList"); | ||
271 | 666 | var scopesListFlickable = findChild(dash, "scopesListFlickable"); | 664 | var scopesListFlickable = findChild(dash, "scopesListFlickable"); |
272 | 665 | flickToYEnd(scopesListFlickable); | ||
273 | 666 | |||
274 | 667 | var nonfavScopesListCategory = findChild(dash, "scopesListCategoryother"); | ||
275 | 668 | var nonfavScopesListCategoryList = findChild(nonfavScopesListCategory, "scopesListCategoryInnerList"); | ||
276 | 667 | tryCompare(nonfavScopesListCategoryList, "currentIndex", 0); | 669 | tryCompare(nonfavScopesListCategoryList, "currentIndex", 0); |
277 | 668 | 670 | ||
278 | 669 | // Ensure the non-favorites, located at the bottom, are visible | 671 | // Ensure the non-favorites, located at the bottom, are visible |
279 | 670 | flickToYEnd(scopesListFlickable); | ||
280 | 671 | mouseClick(nonfavScopesListCategoryList.currentItem); | 672 | mouseClick(nonfavScopesListCategoryList.currentItem); |
281 | 672 | var dashTempScopeItem = findChild(dash, "dashTempScopeItem"); | 673 | var dashTempScopeItem = findChild(dash, "dashTempScopeItem"); |
282 | 673 | tryCompare(dashTempScopeItem, "x", 0); | 674 | tryCompare(dashTempScopeItem, "x", 0); |
283 | 674 | 675 | ||
284 | === modified file 'tests/qmltests/Dash/tst_DashContent.qml' | |||
285 | --- tests/qmltests/Dash/tst_DashContent.qml 2016-11-12 16:33:58 +0000 | |||
286 | +++ tests/qmltests/Dash/tst_DashContent.qml 2017-01-03 17:43:44 +0000 | |||
287 | @@ -70,7 +70,7 @@ | |||
288 | 70 | function loadScopes() { | 70 | function loadScopes() { |
289 | 71 | scopeLoadedSpy.clear(); | 71 | scopeLoadedSpy.clear(); |
290 | 72 | scopesModel.load(); | 72 | scopesModel.load(); |
292 | 73 | tryCompare(scopeLoadedSpy, "count", 8, 15000); | 73 | tryCompare(scopeLoadedSpy, "count", 28, 15000); |
293 | 74 | tryCompare(scopesModel, "loaded", true); | 74 | tryCompare(scopesModel, "loaded", true); |
294 | 75 | tryCompareFunction(function() { | 75 | tryCompareFunction(function() { |
295 | 76 | var mockScope1Loader = findChild(shell, "scopeLoader0"); | 76 | var mockScope1Loader = findChild(shell, "scopeLoader0"); |
296 | @@ -124,7 +124,7 @@ | |||
297 | 124 | 124 | ||
298 | 125 | loadScopes(); | 125 | loadScopes(); |
299 | 126 | 126 | ||
301 | 127 | compare(dashContentList.count, 8); | 127 | compare(dashContentList.count, 28); |
302 | 128 | verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < dashContentList.count); | 128 | verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < dashContentList.count); |
303 | 129 | } | 129 | } |
304 | 130 | 130 | ||
305 | @@ -181,7 +181,7 @@ | |||
306 | 181 | 181 | ||
307 | 182 | // test greater than scope count. | 182 | // test greater than scope count. |
308 | 183 | var currentScopeIndex = dashContent.currentIndex; | 183 | var currentScopeIndex = dashContent.currentIndex; |
310 | 184 | dashContent.setCurrentScopeAtIndex(18, true, false); | 184 | dashContent.setCurrentScopeAtIndex(29, true, false); |
311 | 185 | compare(dashContent.currentIndex, currentScopeIndex, "Scope should not change if changing to greater index than count"); | 185 | compare(dashContent.currentIndex, currentScopeIndex, "Scope should not change if changing to greater index than count"); |
312 | 186 | } | 186 | } |
313 | 187 | 187 | ||
314 | 188 | 188 | ||
315 | === modified file 'tests/qmltests/Dash/tst_DashShell.qml' | |||
316 | --- tests/qmltests/Dash/tst_DashShell.qml 2016-11-29 18:27:40 +0000 | |||
317 | +++ tests/qmltests/Dash/tst_DashShell.qml 2017-01-03 17:43:44 +0000 | |||
318 | @@ -60,7 +60,7 @@ | |||
319 | 60 | tryCompare(dashContentList, "count", 0); | 60 | tryCompare(dashContentList, "count", 0); |
320 | 61 | scopes.load(); | 61 | scopes.load(); |
321 | 62 | tryCompare(dashContentList, "currentIndex", 0); | 62 | tryCompare(dashContentList, "currentIndex", 0); |
323 | 63 | tryCompare(dashContentList, "count", 8); | 63 | tryCompare(dashContentList, "count", 28); |
324 | 64 | tryCompare(scopes, "loaded", true); | 64 | tryCompare(scopes, "loaded", true); |
325 | 65 | tryCompareFunction(function() { | 65 | tryCompareFunction(function() { |
326 | 66 | var mockScope1Loader = findChild(dash, "scopeLoader0"); | 66 | var mockScope1Loader = findChild(dash, "scopeLoader0"); |
FAILED: Continuous integration, rev:2660 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2507/ /unity8- jenkins. ubuntu. com/job/ build/3309 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= vivid+overlay, testname= qmluitests. sh/1894 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= xenial+ overlay, testname= qmluitests. sh/1894 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= zesty,testname= qmluitests. sh/1894 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/3337 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 3189 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 3189/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 3189 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 3189/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/3189 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/3189/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 3189 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 3189/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 3189 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 3189/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/3189 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/3189/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 3189 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 3189/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 3189 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 3189/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/3189 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/3189/ artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2507/ rebuild
https:/