on xenial help sign in
Add test; fix lock state resetting when in full-shell
commit6c2bac9a90128a053221d7d8bda476ab944e044f authorMichael Terry <michael.terry@canonical.com> dateThu 9 Jun 2016, 11:44 (10 years ago) parente885995
2 files changed+21
qml/Greeter/Greeter.qml+1 tests/qmltests/tst_Shell.qml+20
qml/Greeter/Greeter.qml+1
@@ -60,6 +60,7 @@ Showable {
6060 signal emergencyCall()
6161
6262 function forceShow() {
63+ forcedUnlock = false;
6364 showNow();
6465 d.selectUser(d.currentIndex, true);
6566 }
tests/qmltests/tst_Shell.qml+20
@@ -65,6 +65,7 @@ Rectangle {
6565 property int shellOrientation: Qt.PortraitOrientation
6666 property int nativeOrientation: Qt.PortraitOrientation
6767 property int primaryOrientation: Qt.PortraitOrientation
68+ property string mode: "full-greeter"
6869
6970 state: "phone"
7071 states: [
@@ -114,6 +115,7 @@ Rectangle {
114115 native_: shellLoader.nativeOrientation
115116 primary: shellLoader.primaryOrientation
116117 }
118+ mode: shellLoader.mode
117119 Component.onDestruction: {
118120 shellLoader.itemDestroyed = true;
119121 }
@@ -508,6 +510,7 @@ Rectangle {
508510 AccountsService.demoEdges = false;
509511 AccountsService.demoEdgesCompleted = [];
510512 Wizard.System.wizardEnabled = false;
513+ shellLoader.mode = "full-greeter";
511514
512515 // kill all (fake) running apps
513516 killApps();
@@ -2454,5 +2457,22 @@ Rectangle {
24542457
24552458 tryCompare(appDelegate, "state", "normal");
24562459 }
2460+
2461+ function test_fullShellModeHasNoInitialGreeter() {
2462+ setLightDMMockMode("single-pin");
2463+ shellLoader.mode = "full-shell";
2464+ loadShell("phone");
2465+ shell.usageScenario = "phone";
2466+ waitForRendering(shell);
2467+
2468+ var greeter = findChild(shell, "greeter");
2469+ verify(!greeter.shown);
2470+ verify(!greeter.locked);
2471+
2472+ showGreeter();
2473+
2474+ verify(greeter.shown);
2475+ verify(greeter.locked);
2476+ }
24572477 }
24582478}