Merge lp:~mzanetti/unity8/generic-lockscreen into lp:unity8
- generic-lockscreen
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michał Sawicz |
Approved revision: | 480 |
Merged at revision: | 547 |
Proposed branch: | lp:~mzanetti/unity8/generic-lockscreen |
Merge into: | lp:unity8 |
Diff against target: |
225 lines (+66/-37) 5 files modified
Greeter/Lockscreen.qml (+6/-18) Greeter/PassphraseLockscreen.qml (+1/-0) Greeter/PinLockscreen.qml (+1/-0) Shell.qml (+12/-1) tests/qmltests/Greeter/tst_Lockscreen.qml (+46/-18) |
To merge this branch: | bzr merge lp:~mzanetti/unity8/generic-lockscreen |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Mirco Müller (community) | Approve | ||
Review via email: mp+191951@code.launchpad.net |
Commit message
drop all references to LighDM from the Lockscreen
This should make it generic enough to allow reusing it for SIM PIN entry
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
Mirco Müller (macslow) wrote : | # |
There are three merge-conflicts in tests/qmltests/
1.)
<<<<<<< TREE
=======
>>>>>>> MERGE-SOURCE
2.)
<<<<<<< TREE
=======
>>>>>>> MERGE-SOURCE
3.)
<<<<<<< TREE
}
function test_clear_data() {
return [
];
}
function test_clear(data) {
var inputField = findChild(
if (data.alphanumeric) {
=======
if (!data.
// make sure the input is cleared on wrong input
>>>>>>> MERGE-SOURCE
Mirco Müller (macslow) wrote : | # |
Looking good now.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:480
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
None: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
None: http://
Michał Sawicz (saviq) wrote : | # |
Had to abort, qmluitests failed due to hash sum mismatches :/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
None: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'Greeter/Lockscreen.qml' |
2 | --- Greeter/Lockscreen.qml 2013-10-25 12:59:01 +0000 |
3 | +++ Greeter/Lockscreen.qml 2013-11-18 15:21:12 +0000 |
4 | @@ -17,7 +17,6 @@ |
5 | import QtQuick 2.0 |
6 | import Ubuntu.Components 0.1 |
7 | import "../Components" |
8 | -import LightDM 0.1 as LightDM |
9 | |
10 | Showable { |
11 | id: root |
12 | @@ -37,7 +36,7 @@ |
13 | |
14 | property url background: "" |
15 | |
16 | - signal unlocked() |
17 | + signal entered(string passphrase) |
18 | signal cancel() |
19 | signal emergencyCall() |
20 | |
21 | @@ -53,6 +52,10 @@ |
22 | pinPadLoader.resetting = false; |
23 | } |
24 | |
25 | + function clear(showAnimation) { |
26 | + pinPadLoader.item.clear(showAnimation); |
27 | + } |
28 | + |
29 | Rectangle { |
30 | // In case background fails to load or is undefined |
31 | id: backgroundBackup |
32 | @@ -92,7 +95,7 @@ |
33 | target: pinPadLoader.item |
34 | |
35 | onEntered: { |
36 | - LightDM.Greeter.respond(passphrase); |
37 | + root.entered(passphrase); |
38 | } |
39 | |
40 | onCancel: { |
41 | @@ -150,19 +153,4 @@ |
42 | anchors.horizontalCenter: parent.horizontalCenter |
43 | } |
44 | } |
45 | - |
46 | - Connections { |
47 | - target: LightDM.Greeter |
48 | - |
49 | - onAuthenticationComplete: { |
50 | - if (LightDM.Greeter.promptless) { |
51 | - return; |
52 | - } |
53 | - if (LightDM.Greeter.authenticated) { |
54 | - root.unlocked(); |
55 | - } else { |
56 | - pinPadLoader.item.clear(true); |
57 | - } |
58 | - } |
59 | - } |
60 | } |
61 | |
62 | === modified file 'Greeter/PassphraseLockscreen.qml' |
63 | --- Greeter/PassphraseLockscreen.qml 2013-06-06 12:18:34 +0000 |
64 | +++ Greeter/PassphraseLockscreen.qml 2013-11-18 15:21:12 +0000 |
65 | @@ -82,6 +82,7 @@ |
66 | |
67 | WrongPasswordAnimation { |
68 | id: wrongPasswordAnimation |
69 | + objectName: "wrongPasswordAnimation" |
70 | target: pinentryField |
71 | } |
72 | } |
73 | |
74 | === modified file 'Greeter/PinLockscreen.qml' |
75 | --- Greeter/PinLockscreen.qml 2013-10-17 13:08:36 +0000 |
76 | +++ Greeter/PinLockscreen.qml 2013-11-18 15:21:12 +0000 |
77 | @@ -210,6 +210,7 @@ |
78 | |
79 | WrongPasswordAnimation { |
80 | id: wrongPasswordAnimation |
81 | + objectName: "wrongPasswordAnimation" |
82 | target: pinentryField |
83 | } |
84 | } |
85 | |
86 | === modified file 'Shell.qml' |
87 | --- Shell.qml 2013-11-08 08:48:11 +0000 |
88 | +++ Shell.qml 2013-11-18 15:21:12 +0000 |
89 | @@ -416,7 +416,7 @@ |
90 | height: parent.height - panel.panelHeight |
91 | background: shell.background |
92 | |
93 | - onUnlocked: lockscreen.hide() |
94 | + onEntered: LightDM.Greeter.respond(passphrase); |
95 | onCancel: greeter.show() |
96 | |
97 | Component.onCompleted: { |
98 | @@ -442,6 +442,17 @@ |
99 | lockscreen.show(); |
100 | } |
101 | } |
102 | + |
103 | + onAuthenticationComplete: { |
104 | + if (LightDM.Greeter.promptless) { |
105 | + return; |
106 | + } |
107 | + if (LightDM.Greeter.authenticated) { |
108 | + lockscreen.hide(); |
109 | + } else { |
110 | + lockscreen.clear(true); |
111 | + } |
112 | + } |
113 | } |
114 | |
115 | Greeter { |
116 | |
117 | === modified file 'tests/qmltests/Greeter/tst_Lockscreen.qml' |
118 | --- tests/qmltests/Greeter/tst_Lockscreen.qml 2013-10-17 13:08:36 +0000 |
119 | +++ tests/qmltests/Greeter/tst_Lockscreen.qml 2013-11-18 15:21:12 +0000 |
120 | @@ -41,7 +41,7 @@ |
121 | target: lockscreen |
122 | |
123 | onEmergencyCall: emergencyCheckBox.checked = true |
124 | - onUnlocked: unlockedCheckBox.checked = true |
125 | + onEntered: enteredLabel.text = passphrase |
126 | } |
127 | |
128 | Connections { |
129 | @@ -99,12 +99,11 @@ |
130 | anchors.verticalCenter: parent.verticalCenter |
131 | } |
132 | Row { |
133 | - CheckBox { |
134 | - id: unlockedCheckBox |
135 | + Label { |
136 | + text: "Entered:" |
137 | } |
138 | Label { |
139 | - text: "Unlocked signal" |
140 | - anchors.verticalCenter: parent.verticalCenter |
141 | + id: enteredLabel |
142 | } |
143 | } |
144 | Button { |
145 | @@ -176,16 +175,16 @@ |
146 | |
147 | function test_unlock_data() { |
148 | return [ |
149 | - {tag: "numeric", alphanumeric: false, username: "has-pin", password: "1234", unlockedSignal: true, pinLength: 4}, |
150 | - {tag: "alphanumeric", alphanumeric: true, username: "has-password", password: "password", unlockedSignal: true, pinLength: -1}, |
151 | - {tag: "numeric (wrong)", alphanumeric: false, username: "has-pin", password: "4321", unlockedSignal: false, pinLength: 4}, |
152 | - {tag: "alphanumeric (wrong)", alphanumeric: true, username: "has-password", password: "drowssap", unlockedSignal: false, pinLength: -1}, |
153 | - {tag: "flexible length", alphanumeric: false, username: "has-pin", password: "1234", unlockedSignal: true, pinLength: -1}, |
154 | + {tag: "numeric", alphanumeric: false, username: "has-pin", password: "1234", pinLength: 4}, |
155 | + {tag: "alphanumeric", alphanumeric: true, username: "has-password", password: "password", pinLength: -1}, |
156 | + {tag: "numeric (wrong)", alphanumeric: false, username: "has-pin", password: "4321", pinLength: 4}, |
157 | + {tag: "alphanumeric (wrong)", alphanumeric: true, username: "has-password", password: "drowssap", pinLength: -1}, |
158 | + {tag: "flexible length", alphanumeric: false, username: "has-pin", password: "1234", pinLength: -1}, |
159 | ] |
160 | } |
161 | |
162 | function test_unlock(data) { |
163 | - unlockedCheckBox.checked = false |
164 | + enteredLabel.text = "" |
165 | pinLengthTextField.text = data.pinLength |
166 | LightDM.Greeter.authenticate(data.username) |
167 | waitForRendering(lockscreen) |
168 | @@ -206,14 +205,43 @@ |
169 | mouseClick(pinPadButtonErase, units.gu(1), units.gu(1)); |
170 | } |
171 | } |
172 | - |
173 | - tryCompare(unlockedCheckBox, "checked", data.unlockedSignal) |
174 | - if (!data.unlockedSignal) { |
175 | - // make sure the input is cleared on wrong input |
176 | - tryCompareFunction(function() {return inputField.text.length == 0}, true) |
177 | + tryCompare(enteredLabel, "text", data.password) |
178 | + } |
179 | + |
180 | + function test_clear_data() { |
181 | + return [ |
182 | + {tag: "animated PIN", animation: true, alphanumeric: false}, |
183 | + {tag: "not animated PIN", animation: false, alphanumeric: false}, |
184 | + {tag: "animated passphrase", animation: true, alphanumeric: true}, |
185 | + {tag: "not animated passphrase", animation: false, alphanumeric: true} |
186 | + ]; |
187 | + } |
188 | + |
189 | + function test_clear(data) { |
190 | + pinPadCheckBox.checked = data.alphanumeric |
191 | + waitForRendering(lockscreen) |
192 | + |
193 | + var inputField = findChild(lockscreen, "pinentryField") |
194 | + if (data.alphanumeric) { |
195 | + mouseClick(inputField, units.gu(1), units.gu(1)) |
196 | + typeString("1") |
197 | } else { |
198 | - tryCompareFunction(function() {return inputField.text.length > 0}, true) |
199 | + var button = findChild(lockscreen, "pinPadButton1") |
200 | + mouseClick(button, units.gu(1), units.gu(1)) |
201 | } |
202 | + |
203 | + var animation = findInvisibleChild(lockscreen, "wrongPasswordAnimation") |
204 | + |
205 | + tryCompare(inputField, "text", "1") |
206 | + |
207 | + lockscreen.clear(data.animation) |
208 | + tryCompare(inputField, "text", "") |
209 | + |
210 | + wait(0) // Trigger event loop to make sure the animation would start running |
211 | + compare(animation.running, data.animation) |
212 | + |
213 | + // wait for animation to finish to not disturb other tests |
214 | + tryCompare(animation, "running", false) |
215 | } |
216 | |
217 | function test_backspace_data() { |
218 | @@ -224,7 +252,7 @@ |
219 | } |
220 | |
221 | function test_backspace(data) { |
222 | - LightDM.Greeter.authenticate("has-pin"); |
223 | + pinPadCheckBox.checked = false |
224 | pinLengthTextField.text = data.pinLength |
225 | waitForRendering(lockscreen); |
226 |
FAILED: Continuous integration, rev:479 jenkins. qa.ubuntu. com/job/ unity8- ci/1455/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- saucy/5108 jenkins. qa.ubuntu. com/job/ generic- mediumtests- touch/3086/ console jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- saucy/2326 jenkins. qa.ubuntu. com/job/ unity8- saucy-amd64- ci/478 jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/1455 jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/1455/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- saucy-i386- ci/1454 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-saucy/ 1272 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-amd64/ 983 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-amd64/ 983/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 3088 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 3088/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- maguro/ 2583/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- mako/2634/ console 10.97.0. 26:8080/ job/touch- flash-device/ 196 10.97.0. 26:8080/ job/touch- flash-device/ 197
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 10.97.0. 26:8080/ job/unity8- ci/1455/ rebuild
http://