@@ -19,7 +19,6 @@ import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Greeter"
20import "../../../qml/Greeter"
21import Ubuntu.Components 1.3
21import Ubuntu.Components 1.3
22−import Ubuntu.Fingerprints 0.1
23import AccountsService 0.1
22import AccountsService 0.1
24import GSettings 1.0
23import GSettings 1.0
25import IntegratedLightDM 0.1 as LightDM
24import IntegratedLightDM 0.1 as LightDM
@@ -562,42 +561,46 @@ Item {
564 function test_fingerprintSuccess() {
563 function test_fingerprintSuccess() {
564+ var biometryd = findInvisibleChild(greeter, "biometryd");
565 selectUser("has-password");
565 selectUser("has-password");
566− Fingerprints.mockIdentification(0, Fingerprints.None);
566+ biometryd.mockIdentification(0, "");
567 verify(greeter.forcedUnlock);
567 verify(greeter.forcedUnlock);
570 function test_fingerprintFailureMessage() {
570 function test_fingerprintFailureMessage() {
571+ var biometryd = findInvisibleChild(greeter, "biometryd");
571 selectUser("has-password");
572 selectUser("has-password");
572− Fingerprints.mockIdentification(0, Fingerprints.Error);
573+ biometryd.mockIdentification(0, "error");
573 compare(viewShowErrorMessageSpy.count, 1);
574 compare(viewShowErrorMessageSpy.count, 1);
574 compare(viewShowErrorMessageSpy.signalArguments[0][0], i18n.tr("Try again"));
575 compare(viewShowErrorMessageSpy.signalArguments[0][0], i18n.tr("Try again"));
577 function test_fingerprintTooManyFailures() {
578 function test_fingerprintTooManyFailures() {
579+ var biometryd = findInvisibleChild(greeter, "biometryd");
578 selectUser("has-password");
580 selectUser("has-password");
579− Fingerprints.mockIdentification(0, Fingerprints.Error);
581+ biometryd.mockIdentification(0, "error");
580− Fingerprints.mockIdentification(0, Fingerprints.Error);
582+ biometryd.mockIdentification(0, "error");
581 compare(viewTryToUnlockSpy.count, 0);
583 compare(viewTryToUnlockSpy.count, 0);
583− Fingerprints.mockIdentification(0, Fingerprints.Error);
585+ biometryd.mockIdentification(0, "error");
584 compare(viewTryToUnlockSpy.count, 1);
586 compare(viewTryToUnlockSpy.count, 1);
586 compare(viewShowErrorMessageSpy.count, 3);
588 compare(viewShowErrorMessageSpy.count, 3);
589 function test_fingerprintFailureCountReset() {
591 function test_fingerprintFailureCountReset() {
592+ var biometryd = findInvisibleChild(greeter, "biometryd");
590 selectUser("has-password");
593 selectUser("has-password");
591− Fingerprints.mockIdentification(0, Fingerprints.Error);
594+ biometryd.mockIdentification(0, "error");
592− Fingerprints.mockIdentification(0, Fingerprints.Error);
595+ biometryd.mockIdentification(0, "error");
593 compare(viewTryToUnlockSpy.count, 0);
596 compare(viewTryToUnlockSpy.count, 0);
595 greeter.forceShow();
598 greeter.forceShow();
596− Fingerprints.mockIdentification(0, Fingerprints.Error);
599+ biometryd.mockIdentification(0, "error");
597− Fingerprints.mockIdentification(0, Fingerprints.Error);
600+ biometryd.mockIdentification(0, "error");
598 compare(viewTryToUnlockSpy.count, 0);
601 compare(viewTryToUnlockSpy.count, 0);
600− Fingerprints.mockIdentification(0, Fingerprints.Error);
603+ biometryd.mockIdentification(0, "error");
601 compare(viewTryToUnlockSpy.count, 1);
604 compare(viewTryToUnlockSpy.count, 1);
603 compare(viewShowErrorMessageSpy.count, 5);
606 compare(viewShowErrorMessageSpy.count, 5);