on xenial help sign in
Merge lp:~saviq/unity8/category-header-links
commit1f39c026899b604e8b4a9ef433454dfcc445d185 authorAlbert Astals <albert.astals@canonical.com> dateMon 21 Jul 2014, 17:43 (12 years ago) parentdefec5b658d7a5
2 files changed+30−25
qml/Dash/GenericScopeView.qml+21−21 tests/qmltests/Dash/tst_DashContent.qml+9−4
qml/Dash/GenericScopeView.qml+21−21
@@ -363,31 +363,31 @@ FocusScope {
363363 color: scopeStyle ? scopeStyle.foreground : "grey"
364364 visible: baseItem.expandable && !baseItem.headerLink
365365 }
366+ }
366367
367− Image {
368− visible: index != 0
369− anchors {
370− top: parent.top
371− left: parent.left
372− right: parent.right
373− }
374− fillMode: Image.Stretch
375− source: "graphics/dash_divider_top_lightgrad.png"
376− z: -1
368+ Image {
369+ visible: index != 0
370+ anchors {
371+ top: parent.top
372+ left: parent.left
373+ right: parent.right
377374 }
375+ fillMode: Image.Stretch
376+ source: "graphics/dash_divider_top_lightgrad.png"
377+ z: -1
378+ }
378379
379− Image {
380− // FIXME Should not rely on model.count but view.count, but ListViewWithPageHeader doesn't expose it yet.
381− visible: index != categoryView.model.count - 1
382− anchors {
383− bottom: parent.bottom
384− left: parent.left
385− right: parent.right
386− }
387− fillMode: Image.Stretch
388− source: "graphics/dash_divider_top_darkgrad.png"
389− z: -1
380+ Image {
381+ // FIXME Should not rely on model.count but view.count, but ListViewWithPageHeader doesn't expose it yet.
382+ visible: index != categoryView.model.count - 1
383+ anchors {
384+ bottom: seeAll.bottom
385+ left: parent.left
386+ right: parent.right
390387 }
388+ fillMode: Image.Stretch
389+ source: "graphics/dash_divider_top_darkgrad.png"
390+ z: -1
391391 }
392392 }
393393
tests/qmltests/Dash/tst_DashContent.qml+9−4
@@ -61,6 +61,11 @@ Item {
6161 signalName: "movementStarted"
6262 }
6363
64+ SignalSpy {
65+ id: loadedSpy
66+ signalName: "loaded"
67+ }
68+
6469 UT.UnityTestCase {
6570 name: "DashContent"
6671 when: scopesModel.loaded && windowShown
@@ -78,6 +83,7 @@ Item {
7883
7984 function cleanup() {
8085 movementStartedSpy.clear();
86+ loadedSpy.clear();
8187 dashContent.visible = true;
8288
8389 var dashContentList = findChild(dashContent, "dashContentList");
@@ -135,13 +141,12 @@ Item {
135141
136142 function test_set_current_scope_reset() {
137143 var dashContentList = findChild(dashContent, "dashContentList");
138− verify(dashContentList != undefined);
144+ verify(dashContentList, "Couldn't find dashContentList");
139145 var scope = findChild(dashContent, "MockScope1 loader");
140− waitForRendering(scope);
141146
142− var categoryListView = findChild(dashContentList, "categoryListView");
143− waitForRendering(categoryListView);
147+ tryCompare(scope, "status", Loader.Ready);
144148
149+ var categoryListView = findChild(dashContentList, "categoryListView");
145150 categoryListView.contentY = units.gu(10);
146151
147152 compare(dashContentList.currentItem.item.objectName, "MockScope1")