@@ -176,6 +176,28 @@ Item {
176176 compare(spy.signalArguments[0][0], genericScopeView.scope.categories.data(1, Categories.RoleHeaderLink));
177177 }
178178
179+ function test_headerLink_disable_expansion() {
180+ var categoryListView = findChild(genericScopeView, "categoryListView");
181+ waitForRendering(categoryListView);
182+
183+ categoryListView.contentY = categoryListView.height * 2;
184+
185+ // wait for the item to be there
186+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader4") != null; }, true);
187+
188+ var categoryView = findChild(genericScopeView, "dashCategory4");
189+ verify(categoryView, "Can't find the category view.");
190+
191+ var seeAll = findChild(categoryView, "seeAll");
192+ verify(seeAll, "Can't find the seeAll element");
193+
194+ compare(seeAll.height, 0, "SeeAll should be 0-height.");
195+
196+ openPreview(4, 0);
197+
198+ compare(testCase.previewListView.count, 12, "There should only be 12 items in preview.");
199+ }
200+
179201 function test_narrow_delegate_ranges_expand() {
180202 tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") !== null; }, true);
181203 var category = findChild(genericScopeView, "dashCategory0")
@@ -220,17 +242,19 @@ Item {
220242 compare(grid.height, grid.expandedHeight, "Only category should always be expanded");
221243 }
222244
223− function openPreview() {
245+ function openPreview(category, delegate) {
246+ if (category === undefined) category = 0;
247+ if (delegate === undefined) delegate = 0;
224248 tryCompareFunction(function() {
225− var cardGrid = findChild(genericScopeView, "0");
249+ var cardGrid = findChild(genericScopeView, category);
226250 if (cardGrid != null) {
227− var tile = findChild(cardGrid, "delegate0");
251+ var tile = findChild(cardGrid, "delegate"+delegate);
228252 return tile != null;
229253 }
230254 return false;
231255 },
232256 true);
233− var tile = findChild(findChild(genericScopeView, "0"), "delegate0");
257+ var tile = findChild(findChild(genericScopeView, category), "delegate"+delegate);
234258 mouseClick(tile, tile.width / 2, tile.height / 2);
235259 tryCompare(testCase.previewListView, "open", true);
236260 tryCompare(testCase.previewListView, "x", 0);