on xenial help sign in
Fix test_previewCycle
faa5e87Albert Astals
qml/Dash/PreviewListView.qml+1
@@ -32,6 +32,7 @@ Item {
32 property alias model: previewListView.model
32 property alias model: previewListView.model
33 property alias currentIndex: previewListView.currentIndex
33 property alias currentIndex: previewListView.currentIndex
34 property alias currentItem: previewListView.currentItem
34 property alias currentItem: previewListView.currentItem
35+ property alias count: previewListView.count
35
36
36 Image {
37 Image {
37 objectName: "pointerArrow"
38 objectName: "pointerArrow"
tests/qmltests/Dash/tst_GenericScopeView.qml+11−9
@@ -41,17 +41,10 @@ Item {
41 signal mainStageFocusedApplicationChanged()
41 signal mainStageFocusedApplicationChanged()
42 }
42 }
43
43
44− PreviewListView {
45− id: previewListView
46− anchors.fill: parent
47− openEffect: openEffect
48− categoryView: genericScopeView.categoryView
49− scope: genericScopeView.scope
50− }
51−
52 DashContentOpenEffect {
44 DashContentOpenEffect {
53 id: openEffect
45 id: openEffect
54 previewListView: previewListView
46 previewListView: previewListView
47+ sourceItem: genericScopeView
55 }
48 }
56
49
57 PageHeaderLabel {
50 PageHeaderLabel {
@@ -176,6 +169,7 @@ Item {
176
169
177 function test_previewCycle() {
170 function test_previewCycle() {
178 tryCompare(previewListView, "open", false);
171 tryCompare(previewListView, "open", false);
172+ tryCompare(openEffect, "gap", 0);
179
173
180 openPreview();
174 openPreview();
181
175
@@ -193,7 +187,7 @@ Item {
193 checkArrowPosition(0);
187 checkArrowPosition(0);
194
188
195 // flick to the next previews
189 // flick to the next previews
196−
190+ tryCompare(previewListView, "count", 15);
197 for (var i = 1; i < previewListView.count; ++i) {
191 for (var i = 1; i < previewListView.count; ++i) {
198
192
199 mouseFlick(previewListView, previewListView.width - units.gu(1),
193 mouseFlick(previewListView, previewListView.width - units.gu(1),
@@ -338,4 +332,12 @@ Item {
338 }
332 }
339 }
333 }
340 }
334 }
335+
336+ PreviewListView {
337+ id: previewListView
338+ anchors.fill: parent
339+ openEffect: openEffect
340+ categoryView: genericScopeView.categoryView
341+ scope: genericScopeView.scope
342+ }
341}
343}