on xenial help sign in
Since clickscope is not special in any way now no need to change this code
a2f5bb8Albert Astals
tests/mocks/Unity/fake_scopes.cpp+1−1
@@ -49,9 +49,9 @@ Scopes::~Scopes()
49void Scopes::updateScopes()
49void Scopes::updateScopes()
50{
50{
51 clear();
51 clear();
52+ addScope(new Scope("MockScope1", "People", true, this));
52 addScope(new Scope("MockScope2", "Music", false, this));
53 addScope(new Scope("MockScope2", "Music", false, this));
53 addScope(new Scope("clickscope", "Apps", true, this));
54 addScope(new Scope("clickscope", "Apps", true, this));
54− addScope(new Scope("MockScope1", "People", true, this));
55 addScope(new Scope("MockScope5", "Videos", true, this));
55 addScope(new Scope("MockScope5", "Videos", true, this));
56 addScope(new Scope("SingleCategoryScope", "Single", true, this, 1));
56 addScope(new Scope("SingleCategoryScope", "Single", true, this, 1));
57 addScope(new Scope("MockScope4", "MS4", true, this));
57 addScope(new Scope("MockScope4", "MS4", true, this));
tests/qmltests/Dash/tst_Dash.qml+3−3
@@ -69,9 +69,9 @@ Item {
69
69
70 function get_scope_data() {
70 function get_scope_data() {
71 return [
71 return [
72− { tag: "clickscope", visualIndex: 0 },
72+ { tag: "MockScope1", visualIndex: 0 },
73 { tag: "MockScope2", visualIndex: -1 },
73 { tag: "MockScope2", visualIndex: -1 },
74− { tag: "MockScope1", visualIndex: 1 },
74+ { tag: "clickscope", visualIndex: 1 },
75 { tag: "MockScope5", visualIndex: 2 },
75 { tag: "MockScope5", visualIndex: 2 },
76 ]
76 ]
77 }
77 }
@@ -244,7 +244,7 @@ Item {
244 mouseFlick(dash, startX, startY, stopX, stopY);
244 mouseFlick(dash, startX, startY, stopX, stopY);
245 compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
245 compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
246 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
246 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
247− dashCommunicatorService.mockSetCurrentScope("MockScope1", true, false);
247+ dashCommunicatorService.mockSetCurrentScope("clickscope", true, false);
248 tryCompare(dashContentList, "currentIndex", 1)
248 tryCompare(dashContentList, "currentIndex", 1)
249 }
249 }
250
250
tests/qmltests/Dash/tst_DashContent.qml+6−6
@@ -131,7 +131,7 @@ Item {
131 function test_show_header_on_list_movement() {
131 function test_show_header_on_list_movement() {
132 var dashContentList = findChild(dashContent, "dashContentList");
132 var dashContentList = findChild(dashContent, "dashContentList");
133 verify(dashContentList !== null);
133 verify(dashContentList !== null);
134− var scope = findChild(dashContent, "clickscope loader");
134+ var scope = findChild(dashContent, "MockScope1 loader");
135 waitForRendering(scope);
135 waitForRendering(scope);
136
136
137 var categoryListView = findChild(scope, "categoryListView");
137 var categoryListView = findChild(scope, "categoryListView");
@@ -149,19 +149,19 @@ Item {
149 function test_set_current_scope_reset() {
149 function test_set_current_scope_reset() {
150 var dashContentList = findChild(dashContent, "dashContentList");
150 var dashContentList = findChild(dashContent, "dashContentList");
151 verify(dashContentList, "Couldn't find dashContentList");
151 verify(dashContentList, "Couldn't find dashContentList");
152− var scope = findChild(dashContent, "clickscope loader");
152+ var scope = findChild(dashContent, "MockScope1 loader");
153
153
154 tryCompare(scope, "status", Loader.Ready);
154 tryCompare(scope, "status", Loader.Ready);
155
155
156 var categoryListView = findChild(dashContentList, "categoryListView");
156 var categoryListView = findChild(dashContentList, "categoryListView");
157 categoryListView.contentY = units.gu(10);
157 categoryListView.contentY = units.gu(10);
158
158
159− compare(dashContentList.currentItem.item.objectName, "clickscope")
159+ compare(dashContentList.currentItem.item.objectName, "MockScope1")
160 compare(categoryListView.contentY, units.gu(10));
160 compare(categoryListView.contentY, units.gu(10));
161
161
162 dashContent.setCurrentScopeAtIndex(0, false, true);
162 dashContent.setCurrentScopeAtIndex(0, false, true);
163
163
164− compare(dashContentList.currentItem.item.objectName, "clickscope")
164+ compare(dashContentList.currentItem.item.objectName, "MockScope1")
165 compare(categoryListView.contentY, 0);
165 compare(categoryListView.contentY, 0);
166 }
166 }
167
167
@@ -199,8 +199,8 @@ Item {
199
199
200 function test_scope_mapping_data() {
200 function test_scope_mapping_data() {
201 return [
201 return [
202− {tag: "index0", index: 0, objectName: "clickscope"},
202+ {tag: "index0", index: 0, objectName: "MockScope1"},
203− {tag: "index1", index: 1, objectName: "MockScope1"},
203+ {tag: "index1", index: 1, objectName: "clickscope"},
204 {tag: "index2", index: 2, objectName: "MockScope5"},
204 {tag: "index2", index: 2, objectName: "MockScope5"},
205 {tag: "index3", index: 3, objectName: "SingleCategoryScope"}
205 {tag: "index3", index: 3, objectName: "SingleCategoryScope"}
206 ]
206 ]
tests/qmltests/Dash/tst_GenericScopeView.qml+2−2
@@ -447,8 +447,8 @@ Item {
447
447
448 function test_header_style_data() {
448 function test_header_style_data() {
449 return [
449 return [
450− { tag: "Foreground", index: 0, foreground: "yellow", background: "color:///#f5f5f5", logo: "" },
451− { tag: "Default", index: 1, foreground: UbuntuColors.darkGrey, background: "color:///#f5f5f5", logo: "" },
450+ { tag: "Default", index: 0, foreground: UbuntuColors.darkGrey, background: "color:///#f5f5f5", logo: "" },
451+ { tag: "Foreground", index: 1, foreground: "yellow", background: "color:///#f5f5f5", logo: "" },
452 { tag: "Logo+Background", index: 2, foreground: UbuntuColors.darkGrey, background: "gradient:///lightgrey/grey",
452 { tag: "Logo+Background", index: 2, foreground: UbuntuColors.darkGrey, background: "gradient:///lightgrey/grey",
453 logo: Qt.resolvedUrl("../Dash/tst_PageHeader/logo-ubuntu-orange.svg") },
453 logo: Qt.resolvedUrl("../Dash/tst_PageHeader/logo-ubuntu-orange.svg") },
454 ];
454 ];