@@ -52,11 +52,6 @@ Rectangle {
5252 checked: true
5353 }
5454 }
55− Row {
56− spacing: units.gu(3)
57− Label { text: "rowsWhenCollapsed"}
58− Label { text: filterGrid.rowsWhenCollapsed }
59− }
6055 }
6156
6257 ListModel {
@@ -129,30 +124,30 @@ Rectangle {
129124 name: "FilterGrid"
130125 when: windowShown
131126
132− function test_turningFilterOffShowsAllElements() {
127+ function init() {
133128 filterGrid.model = fakeModel
129+ }
130+
131+ function cleanup() {
132+ filterCheckBox.checked = true
133+ collapsedRowCountSelector.selectedIndex = 1
134+ }
135+
136+ function test_turningFilterOffShowsAllElements() {
134137 tryCompareFunction(countVisibleDelegates, 6)
135138
136139 filterCheckBox.checked = false
137140
138141 tryCompareFunction(countVisibleDelegates, 12)
139−
140− // back to initial state
141− filterCheckBox.checked = true
142142 }
143143
144144 function test_collapsedRowCount() {
145− filterGrid.model = fakeModel
146−
147145 for (var i = 0; i < 4; ++i) {
148146 collapsedRowCountSelector.selectedIndex = i
149147 // We have 3 elements per row.
150148 // row count == index + 1
151149 tryCompareFunction(countVisibleDelegates, 3*(i+1))
152150 }
153−
154− // back to initial state
155− collapsedRowCountSelector.selectedIndex = 1
156151 }
157152
158153 function test_modelSizeAffectsCollapsedRowCount_data() {