on xenial help sign in
update tests
a9e774eMichael Zanetti
tests/qmltests/Greeter/tst_Lockscreen.qml+7−1
@@ -187,8 +187,8 @@ Rectangle {
187 unlockedCheckBox.checked = false
187 unlockedCheckBox.checked = false
188 LightDM.Greeter.authenticate(data.username)
188 LightDM.Greeter.authenticate(data.username)
189
189
190+ var inputField = findChild(lockscreen, "pinentryField")
190 if (data.alphanumeric) {
191 if (data.alphanumeric) {
191− var inputField = findChild(lockscreen, "pinentryField")
192 mouseClick(inputField, units.gu(1), units.gu(1))
192 mouseClick(inputField, units.gu(1), units.gu(1))
193 typeString(data.password)
193 typeString(data.password)
194 keyClick(Qt.Key_Enter)
194 keyClick(Qt.Key_Enter)
@@ -200,6 +200,12 @@ Rectangle {
200 }
200 }
201 }
201 }
202 tryCompare(unlockedCheckBox, "checked", data.unlockedSignal)
202 tryCompare(unlockedCheckBox, "checked", data.unlockedSignal)
203+ if (!data.unlockedSignal) {
204+ // make sure the input is cleared on wrong input
205+ tryCompareFunction(function() {return inputField.text.length == 0}, true)
206+ } else {
207+ tryCompareFunction(function() {return inputField.text.length > 0}, true)
208+ }
203 }
209 }
204 }
210 }
205}
211}