on xenial help sign in
More test changes
f8c442fMichael Terry
qml/Greeter/Greeter.qml+1−2
@@ -204,7 +204,7 @@ Showable {
204 onResponded: {
204 onResponded: {
205 if (root.locked) {
205 if (root.locked) {
206 LightDM.Greeter.respond(response);
206 LightDM.Greeter.respond(response);
207− } else {
207+ } else if (LightDM.Greeter.active && !LightDM.Greeter.authenticated) { // could happen if forcedUnlock
208 d.login();
208 d.login();
209 }
209 }
210 }
210 }
@@ -284,7 +284,6 @@ Showable {
284 onShowGreeter: {
284 onShowGreeter: {
285 root.show();
285 root.show();
286 loader.item.reset();
286 loader.item.reset();
287− d.selectUser(d.currentIndex);
288 }
287 }
289
288
290 onHideGreeter: {
289 onHideGreeter: {
tests/qmltests/tst_Shell.qml+5−4
@@ -19,6 +19,7 @@
19
19
20import QtQuick 2.0
20import QtQuick 2.0
21import QtTest 1.0
21import QtTest 1.0
22+import AccountsService 0.1
22import GSettings 1.0
23import GSettings 1.0
23import LightDM 0.1 as LightDM
24import LightDM 0.1 as LightDM
24import Ubuntu.Components 1.1
25import Ubuntu.Components 1.1
@@ -779,8 +780,8 @@ Item {
779
780
780 function test_background_data() {
781 function test_background_data() {
781 return [
782 return [
782− {tag: "color", accounts: "data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>", gsettings: "", output: "data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>"},
783+ {tag: "color", accounts: Qt.resolvedUrl("data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>"), gsettings: "", output: Qt.resolvedUrl("data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>")},
783− {tag: "empty", accounts: "", gsettings: "", output: ""},
784+ {tag: "empty", accounts: "", gsettings: "", output: shell.defaultBackground},
784 {tag: "as-specified", accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), gsettings: "", output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
785 {tag: "as-specified", accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), gsettings: "", output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
785 {tag: "gs-specified", accounts: "", gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), output: Qt.resolvedUrl("../data/unity/backgrounds/red.png")},
786 {tag: "gs-specified", accounts: "", gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), output: Qt.resolvedUrl("../data/unity/backgrounds/red.png")},
786 {tag: "both-specified", accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
787 {tag: "both-specified", accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
@@ -790,9 +791,9 @@ Item {
790 }
791 }
791 function test_background(data) {
792 function test_background(data) {
792 AccountsService.backgroundFile = data.accounts;
793 AccountsService.backgroundFile = data.accounts;
793− var backgroundSettings = findChild(shell, "backgroundSettings");
794+ var backgroundSettings = findInvisibleChild(shell, "backgroundSettings");
794 backgroundSettings.pictureUri = data.gsettings;
795 backgroundSettings.pictureUri = data.gsettings;
795− tryCompare(shell.background, data.output);
796+ tryCompare(shell, "background", data.output);
796 }
797 }
797 }
798 }
798}
799}
tests/qmltests/tst_TabletShell.qml+5−19
@@ -88,11 +88,11 @@ Item {
88 }
88 }
89 }
89 }
90 }
90 }
91− }
92− Button {
91+ Button {
93− text: "Demo edges"
92+ text: "Demo edges"
94− onClicked: {
93+ onClicked: {
95− AccountsService.demoEdges = true
94+ AccountsService.demoEdges = true;
95+ }
96 }
96 }
97 }
97 }
98 }
98 }
@@ -229,20 +229,6 @@ Item {
229 touchFlick(shell, touchStartX, touchStartY, swipeLength, touchStartY)
229 touchFlick(shell, touchStartX, touchStartY, swipeLength, touchStartY)
230 }
230 }
231
231
232− function test_noLockscreen() {
233− selectUser("has-password")
234− var lockscreen = findChild(shell, "lockscreen")
235− compare(lockscreen, null);
236− }
237−
238− function test_showAndHideGreeterDBusCalls() {
239− var greeter = findChild(shell, "greeter")
240− LightDM.Greeter.hideGreeter()
241− tryCompare(greeter, "shown", false);
242− LightDM.Greeter.showGreeter()
243− tryCompare(greeter, "fullyShown", true);
244− }
245−
246 function test_login_data() {
232 function test_login_data() {
247 return [
233 return [
248 {tag: "auth error", user: "auth-error", loggedIn: false, password: ""},
234 {tag: "auth error", user: "auth-error", loggedIn: false, password: ""},