on xenial help sign in
add a test
commitcf723d8f09db250fc664d591b357fff1d85c7f19 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 11 Nov 2014, 10:55 (12 years ago) parent7d43d24
1 file changed+27
tests/qmltests/tst_ShellWithPin.qml+27
tests/qmltests/tst_ShellWithPin.qml+27
@@ -444,5 +444,32 @@ Item {
444444 tryCompare(lockscreen, "shown", false);
445445 tryCompare(LightDM.Greeter, "active", false);
446446 }
447+
448+ function test_suspend() {
449+ var greeter = findChild(shell, "greeter");
450+
451+ // Put it to sleep
452+ Powerd.status = Powerd.Off;
453+
454+ // If locked, ApplicationManager.suspended should be true
455+ tryCompare(ApplicationManager, "suspended", true);
456+
457+ // And wake up
458+ Powerd.status = Powerd.On;
459+ tryCompare(greeter, "showProgress", 1);
460+
461+ // Swipe away greeter to focus app
462+ swipeAwayGreeter();
463+
464+ // We have a lockscreen, make sure we're still suspended
465+ tryCompare(ApplicationManager, "suspended", true);
466+
467+ enterPin("1234")
468+
469+ // Now that the lockscreen has gone too, make sure we're waking up
470+ tryCompare(ApplicationManager, "suspended", false);
471+
472+ }
473+
447474 }
448475}