on xenial help sign in
More test changes
commitf8c442fffa6915feba8e00909be0984782759410 authorMichael Terry <michael.terry@canonical.com> dateFri 30 Jan 2015, 10:13 (12 years ago) parente5dd762
3 files changed+11−25
qml/Greeter/Greeter.qml+1−2 tests/qmltests/tst_Shell.qml+5−4 tests/qmltests/tst_TabletShell.qml+5−19
qml/Greeter/Greeter.qml+1−2
@@ -204,7 +204,7 @@ Showable {
204204 onResponded: {
205205 if (root.locked) {
206206 LightDM.Greeter.respond(response);
207− } else {
207+ } else if (LightDM.Greeter.active && !LightDM.Greeter.authenticated) { // could happen if forcedUnlock
208208 d.login();
209209 }
210210 }
@@ -284,7 +284,6 @@ Showable {
284284 onShowGreeter: {
285285 root.show();
286286 loader.item.reset();
287− d.selectUser(d.currentIndex);
288287 }
289288
290289 onHideGreeter: {
tests/qmltests/tst_Shell.qml+5−4
@@ -19,6 +19,7 @@
1919
2020import QtQuick 2.0
2121import QtTest 1.0
22+import AccountsService 0.1
2223import GSettings 1.0
2324import LightDM 0.1 as LightDM
2425import Ubuntu.Components 1.1
@@ -779,8 +780,8 @@ Item {
779780
780781 function test_background_data() {
781782 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: "empty", accounts: "", gsettings: "", output: ""},
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>")},
784+ {tag: "empty", accounts: "", gsettings: "", output: shell.defaultBackground},
784785 {tag: "as-specified", accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), gsettings: "", output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
785786 {tag: "gs-specified", accounts: "", gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), output: Qt.resolvedUrl("../data/unity/backgrounds/red.png")},
786787 {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 {
790791 }
791792 function test_background(data) {
792793 AccountsService.backgroundFile = data.accounts;
793− var backgroundSettings = findChild(shell, "backgroundSettings");
794+ var backgroundSettings = findInvisibleChild(shell, "backgroundSettings");
794795 backgroundSettings.pictureUri = data.gsettings;
795− tryCompare(shell.background, data.output);
796+ tryCompare(shell, "background", data.output);
796797 }
797798 }
798799}
tests/qmltests/tst_TabletShell.qml+5−19
@@ -88,11 +88,11 @@ Item {
8888 }
8989 }
9090 }
91− }
92− Button {
93− text: "Demo edges"
94− onClicked: {
95− AccountsService.demoEdges = true
91+ Button {
92+ text: "Demo edges"
93+ onClicked: {
94+ AccountsService.demoEdges = true;
95+ }
9696 }
9797 }
9898 }
@@ -229,20 +229,6 @@ Item {
229229 touchFlick(shell, touchStartX, touchStartY, swipeLength, touchStartY)
230230 }
231231
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−
246232 function test_login_data() {
247233 return [
248234 {tag: "auth error", user: "auth-error", loggedIn: false, password: ""},