on xenial help sign in
Fix test

expandable is now readonly and the toggleFilterButton is gone

commit0b2c935ed6ddf797b990db5dd8427c141f7a6551 authorAlbert Astals <albert.astals@canonical.com> dateFri 9 Aug 2013, 09:41 (13 years ago) parentf580988
1 file changed−35
tests/qmltests/Components/tst_FilterGrid.qml−35
tests/qmltests/Components/tst_FilterGrid.qml−35
@@ -42,15 +42,6 @@ Rectangle {
4242 values: [1,2,3,4]
4343 selectedIndex: 1
4444 }
45− Row {
46− spacing: units.gu(1)
47− Label { anchors.verticalCenter: parent.verticalCenter
48− text: "Expandable" }
49− CheckBox {
50− id: expandableCheckBox
51− checked: true
52− }
53− }
5445 Row {
5546 spacing: units.gu(1)
5647 Label { anchors.verticalCenter: parent.verticalCenter
@@ -94,7 +85,6 @@ Rectangle {
9485 collapsedRowCount:
9586 collapsedRowCountSelector.values[collapsedRowCountSelector.selectedIndex]
9687 filter: filterCheckBox.checked
97− expandable: expandableCheckBox.checked
9888 minimumHorizontalSpacing: units.gu(1)
9989 delegateWidth: units.gu(6)
10090 delegateHeight: units.gu(6)
@@ -142,31 +132,6 @@ Rectangle {
142132 collapsedRowCountSelector.selectedIndex = 1
143133 }
144134
145− // Checks that the filter toggle button, the one that says "View All (xy)",
146− // shows up only when it's possible for the grid to be expanded.
147− function test_filterToggleButton() {
148− var filterToggleButton = findChild(filterGrid, "filterToggleButton");
149−
150− for (var i = 0; i < 4; ++i) {
151− collapsedRowCountSelector.selectedIndex = i
152− // row count == index + 1
153− // The total number of rows is 4.
154−
155− expandableCheckBox.checked = false
156− compare(filterToggleButton.visible, false)
157− expandableCheckBox.checked = true
158−
159− if ((i+1) < 4)
160− compare(filterToggleButton.visible, true)
161− else
162− compare(filterToggleButton.visible, false)
163− }
164−
165− // back to initial state
166− collapsedRowCountSelector.selectedIndex = 1
167− expandableCheckBox.checked = true
168− }
169−
170135 function countVisibleDelegates() {
171136 return __countVisibleDelegates(filterGrid.visibleChildren, 0)
172137 }