@@ -59,6 +59,7 @@ Item {
59 genericScopeView.scope = scopes.getScope(2)
59 genericScopeView.scope = scopes.getScope(2)
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 tryCompare(genericScopeView.categoryView, "contentY", 0)
63 tryCompare(genericScopeView.categoryView, "contentY", 0)
@@ -105,8 +106,6 @@ Item {
107 function test_filter_expand_collapse() {
108 function test_filter_expand_collapse() {
108− // wait for the item to be there
109− waitForRendering(genericScopeView);
110 tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0") != null; }, true);
109 tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0") != null; }, true);
112 var header = findChild(genericScopeView, "dashSectionHeader0")
111 var header = findChild(genericScopeView, "dashSectionHeader0")
@@ -114,18 +113,18 @@ Item {
115 waitForRendering(header);
114 waitForRendering(header);
116 verify(category.expandable);
115 verify(category.expandable);
117− verify(category.filtered);
116+ verify(!category.expanded);
119 var initialHeight = category.height;
118 var initialHeight = category.height;
120 var middleHeight;
119 var middleHeight;
121 mouseClick(header, header.width / 2, header.height / 2);
120 mouseClick(header, header.width / 2, header.height / 2);
122 tryCompareFunction(function() { middleHeight = category.height; return category.height > initialHeight; }, true);
121 tryCompareFunction(function() { middleHeight = category.height; return category.height > initialHeight; }, true);
123− tryCompare(category, "filtered", false);
122+ tryCompare(category, "expanded", true);
124 tryCompareFunction(function() { return category.height > middleHeight; }, true);
123 tryCompareFunction(function() { return category.height > middleHeight; }, true);
126 mouseClick(header, header.width / 2, header.height / 2);
125 mouseClick(header, header.width / 2, header.height / 2);
127 verify(category.expandable);
126 verify(category.expandable);
128− tryCompare(category, "filtered", true);
127+ tryCompare(category, "expanded", false);
131 function test_filter_expand_expand_collapse() {
130 function test_filter_expand_expand_collapse() {
@@ -137,51 +136,47 @@ Item {
138 var header2 = findChild(genericScopeView, "dashSectionHeader2")
137 var header2 = findChild(genericScopeView, "dashSectionHeader2")
139 var category2 = findChild(genericScopeView, "dashCategory2")
138 var category2 = findChild(genericScopeView, "dashCategory2")
140− var category2FilterGrid = category2.children[1].children[2];
141− verify(UT.Util.isInstanceOf(category2FilterGrid, "CardFilterGrid"));
143 waitForRendering(header2);
140 waitForRendering(header2);
144 verify(category2.expandable);
141 verify(category2.expandable);
145− verify(category2.filtered);
142+ verify(!category2.expanded);
147 mouseClick(header2, header2.width / 2, header2.height / 2);
144 mouseClick(header2, header2.width / 2, header2.height / 2);
148− tryCompare(category2, "filtered", false);
145+ tryCompare(category2, "expanded", true);
149− tryCompare(category2FilterGrid, "filtered", false);
151 categoryListView.positionAtBeginning();
147 categoryListView.positionAtBeginning();
153 var header0 = findChild(genericScopeView, "dashSectionHeader0")
149 var header0 = findChild(genericScopeView, "dashSectionHeader0")
154 var category0 = findChild(genericScopeView, "dashCategory0")
150 var category0 = findChild(genericScopeView, "dashCategory0")
155 mouseClick(header0, header0.width / 2, header0.height / 2);
151 mouseClick(header0, header0.width / 2, header0.height / 2);
156− tryCompare(category0, "filtered", false);
152+ tryCompare(category0, "expanded", true);
157− tryCompare(category2, "filtered", true);
153+ tryCompare(category2, "expanded", false);
158− tryCompare(category2FilterGrid, "filtered", true);
159 mouseClick(header0, header0.width / 2, header0.height / 2);
154 mouseClick(header0, header0.width / 2, header0.height / 2);
160− tryCompare(category0, "filtered", true);
155+ tryCompare(category0, "expanded", false);
161− tryCompare(category2, "filtered", true);
156+ tryCompare(category2, "expanded", false);
164 function test_narrow_delegate_ranges_expand() {
159 function test_narrow_delegate_ranges_expand() {
165 tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") != undefined; }, true);
160 tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") != undefined; }, true);
166 var category = findChild(genericScopeView, "dashCategory0")
161 var category = findChild(genericScopeView, "dashCategory0")
167− tryCompare(category, "filtered", true);
162+ tryCompare(category, "expanded", false);
169 shell.width = units.gu(20)
164 shell.width = units.gu(20)
170 var categoryListView = findChild(genericScopeView, "categoryListView");
165 var categoryListView = findChild(genericScopeView, "categoryListView");
171 categoryListView.contentY = units.gu(20);
166 categoryListView.contentY = units.gu(20);
172 var header0 = findChild(genericScopeView, "dashSectionHeader0")
167 var header0 = findChild(genericScopeView, "dashSectionHeader0")
173 mouseClick(header0, header0.width / 2, header0.height / 2);
168 mouseClick(header0, header0.width / 2, header0.height / 2);
174− tryCompare(category, "filtered", false);
169+ tryCompare(category, "expanded", true);
175 tryCompareFunction(function() { return category.item.height == genericScopeView.height - category.item.displayMarginBeginning - category.item.displayMarginEnd; }, true);
170 tryCompareFunction(function() { return category.item.height == genericScopeView.height - category.item.displayMarginBeginning - category.item.displayMarginEnd; }, true);
176 mouseClick(header0, header0.width / 2, header0.height / 2);
171 mouseClick(header0, header0.width / 2, header0.height / 2);
177− tryCompare(category, "filtered", true);
172+ tryCompare(category, "expanded", false);
180 function openPreview() {
175 function openPreview() {
181 tryCompareFunction(function() {
176 tryCompareFunction(function() {
182− var filterGrid = findChild(genericScopeView, "0");
177+ var cardGrid = findChild(genericScopeView, "0");
183− if (filterGrid != null) {
178+ if (cardGrid != null) {
184− var tile = findChild(filterGrid, "delegate0");
179+ var tile = findChild(cardGrid, "delegate0");
185 return tile != null;
180 return tile != null;
187 return false;
182 return false;
@@ -257,7 +252,7 @@ Item {
257 closePreview();
252 closePreview();
260− function test_haeder_logo() {
255+ function test_header_logo() {
261 genericScopeView.scope = scopes.getScope(3);
256 genericScopeView.scope = scopes.getScope(3);
263 var image = findChild(genericScopeView, "titleImage");
258 var image = findChild(genericScopeView, "titleImage");