@@ -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)
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 {
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)
207+ tryCompareFunction(function() {return inputField.text.length > 0}, true)