on xenial help sign in
Adapt tests.
ee49dccMichał Sawicz
qml/Dash/GenericScopeView.qml+1
@@ -311,6 +311,7 @@ FocusScope {
311
311
312 AbstractButton {
312 AbstractButton {
313 id: seeAll
313 id: seeAll
314+ objectName: "seeAll"
314 anchors {
315 anchors {
315 top: rendererLoader.bottom
316 top: rendererLoader.bottom
316 left: parent.left
317 left: parent.left
tests/qmltests/Dash/tst_GenericScopeView.qml+13−13
@@ -107,21 +107,21 @@ Item {
107 function test_filter_expand_collapse() {
107 function test_filter_expand_collapse() {
108 tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0") != null; }, true);
108 tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0") != null; }, true);
109
109
110− var header = findChild(genericScopeView, "dashSectionHeader0")
111 var category = findChild(genericScopeView, "dashCategory0")
110 var category = findChild(genericScopeView, "dashCategory0")
111+ var seeAll = findChild(category, "seeAll")
112
112
113− waitForRendering(header);
113+ waitForRendering(seeAll);
114 verify(category.expandable);
114 verify(category.expandable);
115 verify(!category.expanded);
115 verify(!category.expanded);
116
116
117 var initialHeight = category.height;
117 var initialHeight = category.height;
118 var middleHeight;
118 var middleHeight;
119− mouseClick(header, header.width / 2, header.height / 2);
119+ mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
120 tryCompareFunction(function() { middleHeight = category.height; return category.height > initialHeight; }, true);
120 tryCompareFunction(function() { middleHeight = category.height; return category.height > initialHeight; }, true);
121 tryCompare(category, "expanded", true);
121 tryCompare(category, "expanded", true);
122 tryCompareFunction(function() { return category.height > middleHeight; }, true);
122 tryCompareFunction(function() { return category.height > middleHeight; }, true);
123
123
124− mouseClick(header, header.width / 2, header.height / 2);
124+ mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
125 verify(category.expandable);
125 verify(category.expandable);
126 tryCompare(category, "expanded", false);
126 tryCompare(category, "expanded", false);
127 }
127 }
@@ -133,24 +133,24 @@ Item {
133 var categoryListView = findChild(genericScopeView, "categoryListView");
133 var categoryListView = findChild(genericScopeView, "categoryListView");
134 categoryListView.contentY = categoryListView.height;
134 categoryListView.contentY = categoryListView.height;
135
135
136− var header2 = findChild(genericScopeView, "dashSectionHeader2")
137 var category2 = findChild(genericScopeView, "dashCategory2")
136 var category2 = findChild(genericScopeView, "dashCategory2")
137+ var seeAll2 = findChild(category2, "seeAll")
138
138
139− waitForRendering(header2);
139+ waitForRendering(seeAll2);
140 verify(category2.expandable);
140 verify(category2.expandable);
141 verify(!category2.expanded);
141 verify(!category2.expanded);
142
142
143− mouseClick(header2, header2.width / 2, header2.height / 2);
143+ mouseClick(seeAll2, seeAll2.width / 2, seeAll2.height / 2);
144 tryCompare(category2, "expanded", true);
144 tryCompare(category2, "expanded", true);
145
145
146 categoryListView.positionAtBeginning();
146 categoryListView.positionAtBeginning();
147
147
148− var header0 = findChild(genericScopeView, "dashSectionHeader0")
149 var category0 = findChild(genericScopeView, "dashCategory0")
148 var category0 = findChild(genericScopeView, "dashCategory0")
149+ var seeAll0 = findChild(category0, "seeAll")
150− mouseClick(header0, header0.width / 2, header0.height / 2);
150+ mouseClick(seeAll0, seeAll0.width / 2, seeAll0.height / 2);
151 tryCompare(category0, "expanded", true);
151 tryCompare(category0, "expanded", true);
152 tryCompare(category2, "expanded", false);
152 tryCompare(category2, "expanded", false);
153− mouseClick(header0, header0.width / 2, header0.height / 2);
153+ mouseClick(seeAll0, seeAll0.width / 2, seeAll0.height / 2);
154 tryCompare(category0, "expanded", false);
154 tryCompare(category0, "expanded", false);
155 tryCompare(category2, "expanded", false);
155 tryCompare(category2, "expanded", false);
156 }
156 }
@@ -163,11 +163,11 @@ Item {
163 shell.width = units.gu(20)
163 shell.width = units.gu(20)
164 var categoryListView = findChild(genericScopeView, "categoryListView");
164 var categoryListView = findChild(genericScopeView, "categoryListView");
165 categoryListView.contentY = units.gu(20);
165 categoryListView.contentY = units.gu(20);
166− var header0 = findChild(genericScopeView, "dashSectionHeader0")
166+ var seeAll = findChild(category, "seeAll")
167− mouseClick(header0, header0.width / 2, header0.height / 2);
167+ mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
168 tryCompare(category, "expanded", true);
168 tryCompare(category, "expanded", true);
169 tryCompareFunction(function() { return category.item.height == genericScopeView.height - category.item.displayMarginBeginning - category.item.displayMarginEnd; }, true);
169 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);
171 tryCompare(category, "expanded", false);
171 tryCompare(category, "expanded", false);
172 }
172 }
173
173