@@ -176,6 +176,28 @@ Item {
176 compare(spy.signalArguments[0][0], genericScopeView.scope.categories.data(1, Categories.RoleHeaderLink));
176 compare(spy.signalArguments[0][0], genericScopeView.scope.categories.data(1, Categories.RoleHeaderLink));
179+ function test_headerLink_disable_expansion() {
180+ var categoryListView = findChild(genericScopeView, "categoryListView");
181+ waitForRendering(categoryListView);
183+ categoryListView.contentY = categoryListView.height * 2;
185+ // wait for the item to be there
186+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader4") != null; }, true);
188+ var categoryView = findChild(genericScopeView, "dashCategory4");
189+ verify(categoryView, "Can't find the category view.");
191+ var seeAll = findChild(categoryView, "seeAll");
192+ verify(seeAll, "Can't find the seeAll element");
194+ compare(seeAll.height, 0, "SeeAll should be 0-height.");
198+ compare(testCase.previewListView.count, 12, "There should only be 12 items in preview.");
179 function test_narrow_delegate_ranges_expand() {
201 function test_narrow_delegate_ranges_expand() {
180 tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") !== null; }, true);
202 tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") !== null; }, true);
181 var category = findChild(genericScopeView, "dashCategory0")
203 var category = findChild(genericScopeView, "dashCategory0")
@@ -220,17 +242,19 @@ Item {
220 compare(grid.height, grid.expandedHeight, "Only category should always be expanded");
242 compare(grid.height, grid.expandedHeight, "Only category should always be expanded");
223− function openPreview() {
245+ function openPreview(category, delegate) {
246+ if (category === undefined) category = 0;
247+ if (delegate === undefined) delegate = 0;
224 tryCompareFunction(function() {
248 tryCompareFunction(function() {
225− var cardGrid = findChild(genericScopeView, "0");
249+ var cardGrid = findChild(genericScopeView, category);
226 if (cardGrid != null) {
250 if (cardGrid != null) {
227− var tile = findChild(cardGrid, "delegate0");
251+ var tile = findChild(cardGrid, "delegate"+delegate);
228 return tile != null;
252 return tile != null;
230 return false;
254 return false;
233− var tile = findChild(findChild(genericScopeView, "0"), "delegate0");
257+ var tile = findChild(findChild(genericScopeView, category), "delegate"+delegate);
234 mouseClick(tile, tile.width / 2, tile.height / 2);
258 mouseClick(tile, tile.width / 2, tile.height / 2);
235 tryCompare(testCase.previewListView, "open", true);
259 tryCompare(testCase.previewListView, "open", true);
236 tryCompare(testCase.previewListView, "x", 0);
260 tryCompare(testCase.previewListView, "x", 0);