@@ -60,7 +60,6 @@ Item {
60 shell.width = units.gu(120)
60 shell.width = units.gu(120)
61 genericScopeView.categoryView.positionAtBeginning();
61 genericScopeView.categoryView.positionAtBeginning();
62 waitForRendering(genericScopeView.categoryView);
62 waitForRendering(genericScopeView.categoryView);
63− tryCompare(genericScopeView.categoryView, "contentY", 0)
66 function test_isActive() {
65 function test_isActive() {
@@ -157,7 +156,7 @@ Item {
159 function test_narrow_delegate_ranges_expand() {
158 function test_narrow_delegate_ranges_expand() {
160− tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") != undefined; }, true);
159+ tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") !== null; }, true);
161 var category = findChild(genericScopeView, "dashCategory0")
160 var category = findChild(genericScopeView, "dashCategory0")
162 tryCompare(category, "expanded", false);
161 tryCompare(category, "expanded", false);
@@ -172,6 +171,34 @@ Item {
172 tryCompare(category, "expanded", false);
171 tryCompare(category, "expanded", false);
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;
180+ var category = findChild(genericScopeView, "dashCategory19")
181+ compare(category.expandable, false, "Category with collapsed-rows: 0 should not be expandable");
183+ var grid = findChild(category, "19");
184+ verify(grid, "Could not find the category renderer.");
186+ compare(grid.height, grid.expandedHeight, "Category with collapsed-rows: 0 should always be expanded.");
189+ function test_single_category_expansion() {
190+ genericScopeView.scope = scopes.getScope(4);
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.");
196+ var grid = findChild(category, "0");
197+ verify(grid, "Could not find the category renderer.");
199+ compare(grid.height, grid.expandedHeight, "Only category should always be expanded");
175 function openPreview() {
202 function openPreview() {
176 tryCompareFunction(function() {
203 tryCompareFunction(function() {
177 var cardGrid = findChild(genericScopeView, "0");
204 var cardGrid = findChild(genericScopeView, "0");