on xenial help sign in
Better wait for it to check for growth to have stopped
f5d471aAlbert Astals Cid
qml/Dash/Filters/FilterOptionSelector.qml+1
@@ -27,6 +27,7 @@ FilterWidget {
27
27
28 ListItems.Expandable {
28 ListItems.Expandable {
29 id: expandingItem
29 id: expandingItem
30+ objectName: "expandingItem"
30
31
31 expandedHeight: collapsedHeight + column.height
32 expandedHeight: collapsedHeight + column.height
32 width: parent.width
33 width: parent.width
tests/qmltests/Dash/Filters/tst_FilterOptionSelector.qml+2−7
@@ -70,16 +70,11 @@ Rectangle {
70 when: windowShown
70 when: windowShown
71
71
72 function test_optionSelector() {
72 function test_optionSelector() {
73− var initialHeight = factory.implicitHeight;
73+ var expandingItem = findChild(factory, "expandingItem");
74− var currentHeight = 0;
75 // Open the selector
74 // Open the selector
76 mouseClick(factory);
75 mouseClick(factory);
77 // wait for it to stop growing
76 // wait for it to stop growing
78− while (currentHeight != factory.implicitHeight) {
77+ tryCompare(factory, "implicitHeight", expandingItem.expandedHeight);
79− currentHeight = factory.implicitHeight;
80− wait(250);
81− }
82− verify(initialHeight < currentHeight);
83
78
84 // Check the first option
79 // Check the first option
85 var option0 = findChild(factory, "testOptionSelectorFilterlabel0");
80 var option0 = findChild(factory, "testOptionSelectorFilterlabel0");