on xenial help sign in
dismissTimer change
4cabcf2Albert Astals Cid
tests/qmltests/tst_Shell.qml+19−4
@@ -296,6 +296,20 @@ Rectangle {
296 phoneNumber: "+447812221111"
296 phoneNumber: "+447812221111"
297 }
297 }
298
298
299+ Item {
300+ id: fakeDismissTimer
301+ property bool running: false
302+ signal triggered
303+
304+ function stop() {
305+ running = false;
306+ }
307+
308+ function restart() {
309+ running = true;
310+ }
311+ }
312+
299 UnityTestCase {
313 UnityTestCase {
300 id: testCase
314 id: testCase
301 name: "Shell"
315 name: "Shell"
@@ -333,6 +347,11 @@ Rectangle {
333 var launcher = findChild(shell, "launcher");
347 var launcher = findChild(shell, "launcher");
334 launcherShowDashHomeSpy.target = launcher;
348 launcherShowDashHomeSpy.target = launcher;
335
349
350+ var panel = findChild(launcher, "launcherPanel");
351+ verify(!!panel);
352+
353+ panel.dismissTimer = fakeDismissTimer;
354+
336 waitForGreeterToStabilize();
355 waitForGreeterToStabilize();
337 }
356 }
338
357
@@ -1240,10 +1259,6 @@ Rectangle {
1240
1259
1241 var launcher = findChild(shell, "launcher");
1260 var launcher = findChild(shell, "launcher");
1242
1261
1243− // ensure the launcher dimissal timer never gets triggered during the test run
1244− var dismissTimer = findInvisibleChild(launcher, "dismissTimer");
1245− dismissTimer.interval = 60 * 60 * 1000;
1246−
1247 dragLauncherIntoView();
1262 dragLauncherIntoView();
1248
1263
1249 // Emulate a tap with a finger, where the touch position drifts during the tap.
1264 // Emulate a tap with a finger, where the touch position drifts during the tap.