on xenial help sign in
add a cleanup() function
commit745acc89dd9969dc632929109603f4db71d720e4 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 11 Jul 2016, 15:12 (10 years ago) parent22fbe10
1 file changed+4−3
tests/qmltests/Panel/tst_IndicatorItemRow.qml+4−3
tests/qmltests/Panel/tst_IndicatorItemRow.qml+4−3
@@ -131,6 +131,10 @@ IndicatorTest {
131131 wait(1); // row seems to take a bit of time for item x values to update.
132132 }
133133
134+ function cleanup() {
135+ MockInputDeviceBackend.removeDevice("/kbd0");
136+ }
137+
134138 function wait_for_expansion_to_settle() {
135139 tryCompare(heightAnimation, "running", false);
136140 wait(200); // put a little extra wait in for things to settle
@@ -306,9 +310,6 @@ IndicatorTest {
306310 MockInputDeviceBackend.addMockDevice("/kbd0", InputInfo.Keyboard);
307311 }
308312 tryCompare(item, "hidden", data.hidden);
309− if (data.keyboard) {
310− MockInputDeviceBackend.removeDevice("/kbd0");
311− }
312313 }
313314 }
314315}