on xenial help sign in
add a cleanup() function
745acc8Lukáš Tinkl
tests/qmltests/Panel/tst_IndicatorItemRow.qml+4−3
@@ -131,6 +131,10 @@ IndicatorTest {
131 wait(1); // row seems to take a bit of time for item x values to update.
131 wait(1); // row seems to take a bit of time for item x values to update.
132 }
132 }
133
133
134+ function cleanup() {
135+ MockInputDeviceBackend.removeDevice("/kbd0");
136+ }
137+
134 function wait_for_expansion_to_settle() {
138 function wait_for_expansion_to_settle() {
135 tryCompare(heightAnimation, "running", false);
139 tryCompare(heightAnimation, "running", false);
136 wait(200); // put a little extra wait in for things to settle
140 wait(200); // put a little extra wait in for things to settle
@@ -306,9 +310,6 @@ IndicatorTest {
306 MockInputDeviceBackend.addMockDevice("/kbd0", InputInfo.Keyboard);
310 MockInputDeviceBackend.addMockDevice("/kbd0", InputInfo.Keyboard);
307 }
311 }
308 tryCompare(item, "hidden", data.hidden);
312 tryCompare(item, "hidden", data.hidden);
309− if (data.keyboard) {
310− MockInputDeviceBackend.removeDevice("/kbd0");
311− }
312 }
313 }
313 }
314 }
314}
315}