@@ -60,7 +60,6 @@ Item {
6060 shell.width = units.gu(120)
6161 genericScopeView.categoryView.positionAtBeginning();
6262 waitForRendering(genericScopeView.categoryView);
63− tryCompare(genericScopeView.categoryView, "contentY", 0)
6463 }
6564
6665 function test_isActive() {
@@ -157,7 +156,7 @@ Item {
157156 }
158157
159158 function test_narrow_delegate_ranges_expand() {
160− tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") != undefined; }, true);
159+ tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") !== null; }, true);
161160 var category = findChild(genericScopeView, "dashCategory0")
162161 tryCompare(category, "expanded", false);
163162
@@ -172,6 +171,34 @@ Item {
172171 tryCompare(category, "expanded", false);
173172 }
174173
174+ function test_forced_category_expansion() {
175+ tryCompareFunction(function() {
176+ mouseFlick(genericScopeView, genericScopeView.width/2, genericScopeView.height,
177+ genericScopeView.width/2, genericScopeView.y)
178+ return findChild(genericScopeView, "dashCategory19") !== null;
179+ }, true);
180+ var category = findChild(genericScopeView, "dashCategory19")
181+ compare(category.expandable, false, "Category with collapsed-rows: 0 should not be expandable");
182+
183+ var grid = findChild(category, "19");
184+ verify(grid, "Could not find the category renderer.");
185+
186+ compare(grid.height, grid.expandedHeight, "Category with collapsed-rows: 0 should always be expanded.");
187+ }
188+
189+ function test_single_category_expansion() {
190+ genericScopeView.scope = scopes.getScope(4);
191+
192+ tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") != undefined; }, true);
193+ var category = findChild(genericScopeView, "dashCategory0")
194+ compare(category.expandable, false, "Only category should not be expandable.");
195+
196+ var grid = findChild(category, "0");
197+ verify(grid, "Could not find the category renderer.");
198+
199+ compare(grid.height, grid.expandedHeight, "Only category should always be expanded");
200+ }
201+
175202 function openPreview() {
176203 tryCompareFunction(function() {
177204 var cardGrid = findChild(genericScopeView, "0");