on xenial help sign in
Adapt tests.
commitee49dccdcf1ed2996e2008547de2563f3dffa86d authorMichał Sawicz <michal.sawicz@canonical.com> dateFri 11 Jul 2014, 15:52 (12 years ago) parent0c59801
2 files changed+14−13
qml/Dash/GenericScopeView.qml+1 tests/qmltests/Dash/tst_GenericScopeView.qml+13−13
qml/Dash/GenericScopeView.qml+1
@@ -311,6 +311,7 @@ FocusScope {
311311
312312 AbstractButton {
313313 id: seeAll
314+ objectName: "seeAll"
314315 anchors {
315316 top: rendererLoader.bottom
316317 left: parent.left
tests/qmltests/Dash/tst_GenericScopeView.qml+13−13
@@ -107,21 +107,21 @@ Item {
107107 function test_filter_expand_collapse() {
108108 tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0") != null; }, true);
109109
110− var header = findChild(genericScopeView, "dashSectionHeader0")
111110 var category = findChild(genericScopeView, "dashCategory0")
111+ var seeAll = findChild(category, "seeAll")
112112
113− waitForRendering(header);
113+ waitForRendering(seeAll);
114114 verify(category.expandable);
115115 verify(!category.expanded);
116116
117117 var initialHeight = category.height;
118118 var middleHeight;
119− mouseClick(header, header.width / 2, header.height / 2);
119+ mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
120120 tryCompareFunction(function() { middleHeight = category.height; return category.height > initialHeight; }, true);
121121 tryCompare(category, "expanded", true);
122122 tryCompareFunction(function() { return category.height > middleHeight; }, true);
123123
124− mouseClick(header, header.width / 2, header.height / 2);
124+ mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
125125 verify(category.expandable);
126126 tryCompare(category, "expanded", false);
127127 }
@@ -133,24 +133,24 @@ Item {
133133 var categoryListView = findChild(genericScopeView, "categoryListView");
134134 categoryListView.contentY = categoryListView.height;
135135
136− var header2 = findChild(genericScopeView, "dashSectionHeader2")
137136 var category2 = findChild(genericScopeView, "dashCategory2")
137+ var seeAll2 = findChild(category2, "seeAll")
138138
139− waitForRendering(header2);
139+ waitForRendering(seeAll2);
140140 verify(category2.expandable);
141141 verify(!category2.expanded);
142142
143− mouseClick(header2, header2.width / 2, header2.height / 2);
143+ mouseClick(seeAll2, seeAll2.width / 2, seeAll2.height / 2);
144144 tryCompare(category2, "expanded", true);
145145
146146 categoryListView.positionAtBeginning();
147147
148− var header0 = findChild(genericScopeView, "dashSectionHeader0")
149148 var category0 = findChild(genericScopeView, "dashCategory0")
150− mouseClick(header0, header0.width / 2, header0.height / 2);
149+ var seeAll0 = findChild(category0, "seeAll")
150+ mouseClick(seeAll0, seeAll0.width / 2, seeAll0.height / 2);
151151 tryCompare(category0, "expanded", true);
152152 tryCompare(category2, "expanded", false);
153− mouseClick(header0, header0.width / 2, header0.height / 2);
153+ mouseClick(seeAll0, seeAll0.width / 2, seeAll0.height / 2);
154154 tryCompare(category0, "expanded", false);
155155 tryCompare(category2, "expanded", false);
156156 }
@@ -163,11 +163,11 @@ Item {
163163 shell.width = units.gu(20)
164164 var categoryListView = findChild(genericScopeView, "categoryListView");
165165 categoryListView.contentY = units.gu(20);
166− var header0 = findChild(genericScopeView, "dashSectionHeader0")
167− mouseClick(header0, header0.width / 2, header0.height / 2);
166+ var seeAll = findChild(category, "seeAll")
167+ mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
168168 tryCompare(category, "expanded", true);
169169 tryCompareFunction(function() { return category.item.height == genericScopeView.height - category.item.displayMarginBeginning - category.item.displayMarginEnd; }, true);
170− mouseClick(header0, header0.width / 2, header0.height / 2);
170+ mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
171171 tryCompare(category, "expanded", false);
172172 }
173173