on xenial help sign in
Merge lp:~saviq/unity8/category-header-links
1f39c02Albert Astals
qml/Dash/GenericScopeView.qml+21−21
@@ -363,31 +363,31 @@ FocusScope {
363 color: scopeStyle ? scopeStyle.foreground : "grey"
363 color: scopeStyle ? scopeStyle.foreground : "grey"
364 visible: baseItem.expandable && !baseItem.headerLink
364 visible: baseItem.expandable && !baseItem.headerLink
365 }
365 }
366+ }
366
367
367− Image {
368+ Image {
368− visible: index != 0
369+ visible: index != 0
369− anchors {
370+ anchors {
370− top: parent.top
371+ top: parent.top
371− left: parent.left
372+ left: parent.left
372− right: parent.right
373+ right: parent.right
373− }
374− fillMode: Image.Stretch
375− source: "graphics/dash_divider_top_lightgrad.png"
376− z: -1
377 }
374 }
375+ fillMode: Image.Stretch
376+ source: "graphics/dash_divider_top_lightgrad.png"
377+ z: -1
378+ }
378
379
379− Image {
380+ Image {
380− // FIXME Should not rely on model.count but view.count, but ListViewWithPageHeader doesn't expose it yet.
381+ // 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+ visible: index != categoryView.model.count - 1
382− anchors {
383+ anchors {
383− bottom: parent.bottom
384+ bottom: seeAll.bottom
384− left: parent.left
385+ left: parent.left
385− right: parent.right
386+ right: parent.right
386− }
387− fillMode: Image.Stretch
388− source: "graphics/dash_divider_top_darkgrad.png"
389− z: -1
390 }
387 }
388+ fillMode: Image.Stretch
389+ source: "graphics/dash_divider_top_darkgrad.png"
390+ z: -1
391 }
391 }
392 }
392 }
393
393
tests/qmltests/Dash/tst_DashContent.qml+9−4
@@ -61,6 +61,11 @@ Item {
61 signalName: "movementStarted"
61 signalName: "movementStarted"
62 }
62 }
63
63
64+ SignalSpy {
65+ id: loadedSpy
66+ signalName: "loaded"
67+ }
68+
64 UT.UnityTestCase {
69 UT.UnityTestCase {
65 name: "DashContent"
70 name: "DashContent"
66 when: scopesModel.loaded && windowShown
71 when: scopesModel.loaded && windowShown
@@ -78,6 +83,7 @@ Item {
78
83
79 function cleanup() {
84 function cleanup() {
80 movementStartedSpy.clear();
85 movementStartedSpy.clear();
86+ loadedSpy.clear();
81 dashContent.visible = true;
87 dashContent.visible = true;
82
88
83 var dashContentList = findChild(dashContent, "dashContentList");
89 var dashContentList = findChild(dashContent, "dashContentList");
@@ -135,13 +141,12 @@ Item {
135
141
136 function test_set_current_scope_reset() {
142 function test_set_current_scope_reset() {
137 var dashContentList = findChild(dashContent, "dashContentList");
143 var dashContentList = findChild(dashContent, "dashContentList");
138− verify(dashContentList != undefined);
144+ verify(dashContentList, "Couldn't find dashContentList");
139 var scope = findChild(dashContent, "MockScope1 loader");
145 var scope = findChild(dashContent, "MockScope1 loader");
140− waitForRendering(scope);
141
146
142− var categoryListView = findChild(dashContentList, "categoryListView");
147+ tryCompare(scope, "status", Loader.Ready);
143− waitForRendering(categoryListView);
144
148
149+ var categoryListView = findChild(dashContentList, "categoryListView");
145 categoryListView.contentY = units.gu(10);
150 categoryListView.contentY = units.gu(10);
146
151
147 compare(dashContentList.currentItem.item.objectName, "MockScope1")
152 compare(dashContentList.currentItem.item.objectName, "MockScope1")