on xenial help sign in
move clear into cleanup
099d220Albert Astals
tests/qmltests/Dash/Previews/tst_PreviewActions.qml+5−1
@@ -93,12 +93,16 @@ Rectangle {
93 name: "PreviewActionTest"
93 name: "PreviewActionTest"
94 when: windowShown
94 when: windowShown
95
95
96+ function cleanup()
97+ {
98+ spy.clear();
99+ }
100+
96 function checkButtonPressSignal(target, id)
101 function checkButtonPressSignal(target, id)
97 {
102 {
98 var button = findChild(root, "button" + id);
103 var button = findChild(root, "button" + id);
99 verify(button != null);
104 verify(button != null);
100 spy.target = target;
105 spy.target = target;
101− spy.clear();
102 mouseClick(button, button.width / 2, button.height / 2);
106 mouseClick(button, button.width / 2, button.height / 2);
103 compare(spy.count, 1);
107 compare(spy.count, 1);
104 compare(spy.signalArguments[0][0], target.widgetId);
108 compare(spy.signalArguments[0][0], target.widgetId);