on xenial help sign in
Since clickscope is not special in any way now no need to change this code
commita2f5bb83693e754e65768c188e38805244d9b84c authorAlbert Astals <albert.astals@canonical.com> dateThu 30 Oct 2014, 13:06 (12 years ago) parent1ecc557
4 files changed+12−12
tests/mocks/Unity/fake_scopes.cpp+1−1 tests/qmltests/Dash/tst_Dash.qml+3−3 tests/qmltests/Dash/tst_DashContent.qml+6−6 tests/qmltests/Dash/tst_GenericScopeView.qml+2−2
tests/mocks/Unity/fake_scopes.cpp+1−1
@@ -49,9 +49,9 @@ Scopes::~Scopes()
4949void Scopes::updateScopes()
5050{
5151 clear();
52+ addScope(new Scope("MockScope1", "People", true, this));
5253 addScope(new Scope("MockScope2", "Music", false, this));
5354 addScope(new Scope("clickscope", "Apps", true, this));
54− addScope(new Scope("MockScope1", "People", true, this));
5555 addScope(new Scope("MockScope5", "Videos", true, this));
5656 addScope(new Scope("SingleCategoryScope", "Single", true, this, 1));
5757 addScope(new Scope("MockScope4", "MS4", true, this));
tests/qmltests/Dash/tst_Dash.qml+3−3
@@ -69,9 +69,9 @@ Item {
6969
7070 function get_scope_data() {
7171 return [
72− { tag: "clickscope", visualIndex: 0 },
72+ { tag: "MockScope1", visualIndex: 0 },
7373 { tag: "MockScope2", visualIndex: -1 },
74− { tag: "MockScope1", visualIndex: 1 },
74+ { tag: "clickscope", visualIndex: 1 },
7575 { tag: "MockScope5", visualIndex: 2 },
7676 ]
7777 }
@@ -244,7 +244,7 @@ Item {
244244 mouseFlick(dash, startX, startY, stopX, stopY);
245245 compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
246246 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
247− dashCommunicatorService.mockSetCurrentScope("MockScope1", true, false);
247+ dashCommunicatorService.mockSetCurrentScope("clickscope", true, false);
248248 tryCompare(dashContentList, "currentIndex", 1)
249249 }
250250
tests/qmltests/Dash/tst_DashContent.qml+6−6
@@ -131,7 +131,7 @@ Item {
131131 function test_show_header_on_list_movement() {
132132 var dashContentList = findChild(dashContent, "dashContentList");
133133 verify(dashContentList !== null);
134− var scope = findChild(dashContent, "clickscope loader");
134+ var scope = findChild(dashContent, "MockScope1 loader");
135135 waitForRendering(scope);
136136
137137 var categoryListView = findChild(scope, "categoryListView");
@@ -149,19 +149,19 @@ Item {
149149 function test_set_current_scope_reset() {
150150 var dashContentList = findChild(dashContent, "dashContentList");
151151 verify(dashContentList, "Couldn't find dashContentList");
152− var scope = findChild(dashContent, "clickscope loader");
152+ var scope = findChild(dashContent, "MockScope1 loader");
153153
154154 tryCompare(scope, "status", Loader.Ready);
155155
156156 var categoryListView = findChild(dashContentList, "categoryListView");
157157 categoryListView.contentY = units.gu(10);
158158
159− compare(dashContentList.currentItem.item.objectName, "clickscope")
159+ compare(dashContentList.currentItem.item.objectName, "MockScope1")
160160 compare(categoryListView.contentY, units.gu(10));
161161
162162 dashContent.setCurrentScopeAtIndex(0, false, true);
163163
164− compare(dashContentList.currentItem.item.objectName, "clickscope")
164+ compare(dashContentList.currentItem.item.objectName, "MockScope1")
165165 compare(categoryListView.contentY, 0);
166166 }
167167
@@ -199,8 +199,8 @@ Item {
199199
200200 function test_scope_mapping_data() {
201201 return [
202− {tag: "index0", index: 0, objectName: "clickscope"},
203− {tag: "index1", index: 1, objectName: "MockScope1"},
202+ {tag: "index0", index: 0, objectName: "MockScope1"},
203+ {tag: "index1", index: 1, objectName: "clickscope"},
204204 {tag: "index2", index: 2, objectName: "MockScope5"},
205205 {tag: "index3", index: 3, objectName: "SingleCategoryScope"}
206206 ]
tests/qmltests/Dash/tst_GenericScopeView.qml+2−2
@@ -447,8 +447,8 @@ Item {
447447
448448 function test_header_style_data() {
449449 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: "" },
452452 { tag: "Logo+Background", index: 2, foreground: UbuntuColors.darkGrey, background: "gradient:///lightgrey/grey",
453453 logo: Qt.resolvedUrl("../Dash/tst_PageHeader/logo-ubuntu-orange.svg") },
454454 ];