-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support TouchID functionality #958
Comments
Hello, Starting with version 0.6.0, AppleSimulatorUtils fully supports the simulator biometric system. You can enable or disable enrollment, as well as approve or fail authentication attempts using face or finger. Now the matter of implementing it in Detox. While not a hard task at all, it will take time, and we are currently busy with other tasks. If you would like to contribute a PR implementing this functionality, we will be very happy to assist. In the mean time, as a workaround, you can call |
Thank @LeoNatan appreciate it. I don't have much time free in the future, but maybe i can work on an PR for this. Thanks for the help |
Thank you |
Claiming this - will start work on it now. |
@abunsen Fantastic, thank you! |
So I believe all that needs to be done is a few functions need to be added to async matchBiometric(udid, matchType) {
if (!['face', 'finger'].include(matchType)) {
return;
}
const statusLogs = {
trying: `Trying to match ${matchType}...`,
successful: `Matched ${matchType}!`
};
await this._execAppleSimUtils({ args: `--byId ${udid} --${matchType}}` }, statusLogs, 1);
}
async unmatchBiometric(udid, matchType) {
if (!['Face', 'Finger'].include(matchType)) {
return;
}
const statusLogs = {
trying: `Trying to match ${matchType}...`,
successful: `Matched ${matchType}!`
};
await this._execAppleSimUtils({ args: `--byId ${udid} --unmatch${matchType}}` }, statusLogs, 1);
}
async setBiometricEnrollment(udid, toggle) {
let yesOrNo = toggle ? 'YES' : 'NO'
const statusLogs = {
trying: `Turning ${toggle ? 'on' : 'off'} biometric enrollment`,
successful: toggle ? 'Activated!' : 'Deactivated!'
};
await this._execAppleSimUtils({ args: `--byId ${udid} --biometricEnrollment ${yesOrNo}` }, statusLogs, 1);
} Then tests need to be added in |
This is now supported on iOS only, here are the docs: https://github.com/wix/Detox/blob/master/docs/APIRef.DeviceObjectAPI.md#devicesetbiometricenrollmentbool-ios-only |
Description
I want to know if there is a way to test TouchID, currently i'm using Detox as e2e framwork, and i have touchID logic in my app. It would be nice simulate success and failure and interactions with system alerts binding to the process.
The text was updated successfully, but these errors were encountered: