From 6df7c7da7591d4fca13722ebf0231148536aaf06 Mon Sep 17 00:00:00 2001 From: chen Date: Mon, 25 Jul 2022 10:05:55 +0800 Subject: [PATCH] osAccount API Mock Signed-off-by: chen --- .../systemplugin/napi/ohos_account_osAccount.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/runtime/main/extend/systemplugin/napi/ohos_account_osAccount.js b/runtime/main/extend/systemplugin/napi/ohos_account_osAccount.js index d3ddfaae..ed394b24 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_account_osAccount.js +++ b/runtime/main/extend/systemplugin/napi/ohos_account_osAccount.js @@ -721,14 +721,27 @@ export function mockOsAccount() { getAccountManager: function (...args) { console.warn("osAccount.getAccountManager interface mocked in the Previewer. " + "How this interface works on the Previewer may be different from that on a real device.") - return accountManagerMock; + return AccountManagerMock; }, OsAccountType: { ADMIN: "[PC Preview] unknown ADMIN", NORMAL: "[PC Preview] unknown NORMAL", GUEST: "[PC Preview] unknown GUEST" }, + UserAuth: UserAuthClass, + PINAuth: PINAuthClass, + UserIdentityManager: UserIdentityManagerClass, ConstraintSourceType, + OsAccountType, + FingerprintTips, + FaceTipsCode, + ResultCode, + Module, + AuthTrustLevel, + AuthSubType, + GetPropertyType, + SetPropertyType, + AuthType, } return osAccount }