on xenial help sign in
Fix test
0b2c935Albert Astals
tests/qmltests/Components/tst_FilterGrid.qml−35
@@ -42,15 +42,6 @@ Rectangle {
42 values: [1,2,3,4]
42 values: [1,2,3,4]
43 selectedIndex: 1
43 selectedIndex: 1
44 }
44 }
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− }
54 Row {
45 Row {
55 spacing: units.gu(1)
46 spacing: units.gu(1)
56 Label { anchors.verticalCenter: parent.verticalCenter
47 Label { anchors.verticalCenter: parent.verticalCenter
@@ -94,7 +85,6 @@ Rectangle {
94 collapsedRowCount:
85 collapsedRowCount:
95 collapsedRowCountSelector.values[collapsedRowCountSelector.selectedIndex]
86 collapsedRowCountSelector.values[collapsedRowCountSelector.selectedIndex]
96 filter: filterCheckBox.checked
87 filter: filterCheckBox.checked
97− expandable: expandableCheckBox.checked
98 minimumHorizontalSpacing: units.gu(1)
88 minimumHorizontalSpacing: units.gu(1)
99 delegateWidth: units.gu(6)
89 delegateWidth: units.gu(6)
100 delegateHeight: units.gu(6)
90 delegateHeight: units.gu(6)
@@ -142,31 +132,6 @@ Rectangle {
142 collapsedRowCountSelector.selectedIndex = 1
132 collapsedRowCountSelector.selectedIndex = 1
143 }
133 }
144
134
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−
170 function countVisibleDelegates() {
135 function countVisibleDelegates() {
171 return __countVisibleDelegates(filterGrid.visibleChildren, 0)
136 return __countVisibleDelegates(filterGrid.visibleChildren, 0)
172 }
137 }