@@ -19,7 +19,6 @@ import QtTest 1.0
1919import ".."
2020import "../../../qml/Greeter"
2121import Ubuntu.Components 1.3
22−import Ubuntu.Fingerprints 0.1
2322import AccountsService 0.1
2423import GSettings 1.0
2524import IntegratedLightDM 0.1 as LightDM
@@ -562,42 +561,46 @@ Item {
562561 }
563562
564563 function test_fingerprintSuccess() {
564+ var biometryd = findInvisibleChild(greeter, "biometryd");
565565 selectUser("has-password");
566− Fingerprints.mockIdentification(0, Fingerprints.None);
566+ biometryd.mockIdentification(0, "");
567567 verify(greeter.forcedUnlock);
568568 }
569569
570570 function test_fingerprintFailureMessage() {
571+ var biometryd = findInvisibleChild(greeter, "biometryd");
571572 selectUser("has-password");
572− Fingerprints.mockIdentification(0, Fingerprints.Error);
573+ biometryd.mockIdentification(0, "error");
573574 compare(viewShowErrorMessageSpy.count, 1);
574575 compare(viewShowErrorMessageSpy.signalArguments[0][0], i18n.tr("Try again"));
575576 }
576577
577578 function test_fingerprintTooManyFailures() {
579+ var biometryd = findInvisibleChild(greeter, "biometryd");
578580 selectUser("has-password");
579− Fingerprints.mockIdentification(0, Fingerprints.Error);
580− Fingerprints.mockIdentification(0, Fingerprints.Error);
581+ biometryd.mockIdentification(0, "error");
582+ biometryd.mockIdentification(0, "error");
581583 compare(viewTryToUnlockSpy.count, 0);
582584
583− Fingerprints.mockIdentification(0, Fingerprints.Error);
585+ biometryd.mockIdentification(0, "error");
584586 compare(viewTryToUnlockSpy.count, 1);
585587
586588 compare(viewShowErrorMessageSpy.count, 3);
587589 }
588590
589591 function test_fingerprintFailureCountReset() {
592+ var biometryd = findInvisibleChild(greeter, "biometryd");
590593 selectUser("has-password");
591− Fingerprints.mockIdentification(0, Fingerprints.Error);
592− Fingerprints.mockIdentification(0, Fingerprints.Error);
594+ biometryd.mockIdentification(0, "error");
595+ biometryd.mockIdentification(0, "error");
593596 compare(viewTryToUnlockSpy.count, 0);
594597
595598 greeter.forceShow();
596− Fingerprints.mockIdentification(0, Fingerprints.Error);
597− Fingerprints.mockIdentification(0, Fingerprints.Error);
599+ biometryd.mockIdentification(0, "error");
600+ biometryd.mockIdentification(0, "error");
598601 compare(viewTryToUnlockSpy.count, 0);
599602
600− Fingerprints.mockIdentification(0, Fingerprints.Error);
603+ biometryd.mockIdentification(0, "error");
601604 compare(viewTryToUnlockSpy.count, 1);
602605
603606 compare(viewShowErrorMessageSpy.count, 5);