20
20
import AccountsService 0.1
21
21
import GSettings 1.0
22
import LightDM.IntegratedLightDM 0.1 as LightDM
22
import LightDMController 0.1
23
import LightDM.FullLightDM 0.1 as LightDM
23
24
import Ubuntu.SystemImage 0.1
24
25
import Ubuntu.Telephony 0.1 as Telephony
25
26
import Unity.Application 0.1
36
37
Component.onCompleted: {
37
38
// must set the mock mode before loading the Shell
38
LightDM.Greeter.mockMode = "single-pin";
39
LightDM.Users.mockMode = "single-pin";
39
LightDMController.userMode = "single-pin";
40
40
shellLoader.active = true;
539
533
shellLoader.itemDestroyed = false;
540
534
shellLoader.active = false;
541
535
tryCompare(shellLoader, "itemDestroyed", true);
542
LightDM.Greeter.authenticate(""); // reset greeter
544
537
// Create new shell
546
538
shellLoader.active = true;
547
539
tryCompareFunction(function() {return shell !== null}, true);
549
541
// Confirm that we start disabled
550
compare(promptSpy.count, 0);
542
compare(LightDM.Prompts.count, 0);
551
543
verify(shell.waitingOnGreeter);
552
544
var coverPageDragHandle = findChild(shell, "coverPageDragHandle");
553
545
verify(!coverPageDragHandle.enabled);
555
547
// And that we only become enabled once the lockscreen is up
556
548
tryCompare(shell, "waitingOnGreeter", false);
557
verify(promptSpy.count > 0);
549
verify(LightDM.Prompts.count > 0);
558
550
var lockscreen = findChild(shell, "lockscreen");
559
551
verify(lockscreen.shown);
554
function test_bfbOnLockedDevice() {
555
var launcher = findChild(shell, "launcher");
556
touchFlick(shell, units.gu(.5), shell.height / 2, units.gu(10), shell.height / 2);
558
tryCompare(launcher, "x", 0);
559
tryCompare(launcher, "state", "visible");
561
waitForRendering(shell)
563
var bfb = findChild(launcher, "buttonShowDashHome");
564
mouseClick(bfb, bfb.width / 2, bfb.height / 2);
568
tryCompare(launcher, "state", "drawer");