on xenial help sign in
Fix test_previewCycle
commitfaa5e87d59909be1911bd794e2827c076e09367f authorAlbert Astals <albert.astals@canonical.com> dateTue 28 Jan 2014, 13:38 (13 years ago) parenteba4742
2 files changed+12−9
qml/Dash/PreviewListView.qml+1 tests/qmltests/Dash/tst_GenericScopeView.qml+11−9
qml/Dash/PreviewListView.qml+1
@@ -32,6 +32,7 @@ Item {
3232 property alias model: previewListView.model
3333 property alias currentIndex: previewListView.currentIndex
3434 property alias currentItem: previewListView.currentItem
35+ property alias count: previewListView.count
3536
3637 Image {
3738 objectName: "pointerArrow"
tests/qmltests/Dash/tst_GenericScopeView.qml+11−9
@@ -41,17 +41,10 @@ Item {
4141 signal mainStageFocusedApplicationChanged()
4242 }
4343
44− PreviewListView {
45− id: previewListView
46− anchors.fill: parent
47− openEffect: openEffect
48− categoryView: genericScopeView.categoryView
49− scope: genericScopeView.scope
50− }
51−
5244 DashContentOpenEffect {
5345 id: openEffect
5446 previewListView: previewListView
47+ sourceItem: genericScopeView
5548 }
5649
5750 PageHeaderLabel {
@@ -176,6 +169,7 @@ Item {
176169
177170 function test_previewCycle() {
178171 tryCompare(previewListView, "open", false);
172+ tryCompare(openEffect, "gap", 0);
179173
180174 openPreview();
181175
@@ -193,7 +187,7 @@ Item {
193187 checkArrowPosition(0);
194188
195189 // flick to the next previews
196−
190+ tryCompare(previewListView, "count", 15);
197191 for (var i = 1; i < previewListView.count; ++i) {
198192
199193 mouseFlick(previewListView, previewListView.width - units.gu(1),
@@ -338,4 +332,12 @@ Item {
338332 }
339333 }
340334 }
335+
336+ PreviewListView {
337+ id: previewListView
338+ anchors.fill: parent
339+ openEffect: openEffect
340+ categoryView: genericScopeView.categoryView
341+ scope: genericScopeView.scope
342+ }
341343}