Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1d0a11a0
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1d0a11a0
编写于
3月 04, 2022
作者:
G
gaoxi785
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add xts case to query distributed id
Signed-off-by:
N
gaoxi785
<
gaoxi785@huawei.com
>
上级
5b8e55d0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
0 deletion
+41
-0
account/OsAccountTest_js/signature/openharmony_sx.p7b
account/OsAccountTest_js/signature/openharmony_sx.p7b
+0
-0
account/OsAccountTest_js/src/main/config.json
account/OsAccountTest_js/src/main/config.json
+13
-0
account/OsAccountTest_js/src/main/js/default/test/OsAccount.test.js
...AccountTest_js/src/main/js/default/test/OsAccount.test.js
+28
-0
未找到文件。
account/OsAccountTest_js/signature/openharmony_sx.p7b
浏览文件 @
1d0a11a0
无法预览此类型文件
account/OsAccountTest_js/src/main/config.json
浏览文件 @
1d0a11a0
...
...
@@ -23,6 +23,19 @@
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"defPermissions"
:
[
{
"availableScope"
:
[],
"grantMode"
:
"system_grant"
,
"name"
:
"ohos.permission.MANAGE_LOCAL_ACCOUNTS"
}
],
"reqPermissions"
:
[
{
"name"
:
"ohos.permission.MANAGE_LOCAL_ACCOUNTS"
,
"reason"
:
"ceshi"
}
],
"abilities"
:
[
{
"visible"
:
true
,
...
...
account/OsAccountTest_js/src/main/js/default/test/OsAccount.test.js
浏览文件 @
1d0a11a0
...
...
@@ -22,6 +22,34 @@ describe('AccountTest', function () {
})
afterEach
(
function
()
{
})
/**
* @tc.number ActsDistributedAccountDeviceId_0100
* @tc.name Test query the distribruted id by callback.
* @tc.desc Test distributedAccount.queryOsAccountDistributedInfo API functionality by callback.
*/
it
(
'
ActsDistributedAccountDeviceId_0100
'
,
0
,
async
function
(
done
){
console
.
log
(
"
test query distribtued id start
"
);
const
distributedId
=
'
169C610CEF7F8310D78763C7DD8D28F0668D9FB8B1A3659CEF8F6BC3D9B39E17
'
;
const
accountAbility
=
account
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
{
name
:
'
ZhangSan
'
,
id
:
'
12345
'
,
event
:
"
Ohos.account.event.LOGIN
"
},
(
err
)
=>
{
console
.
log
(
"
update distributedInfo err:
"
+
JSON
.
stringify
(
err
));
accountAbility
.
queryOsAccountDistributedInfo
((
err
,
distributedInfo
)
=>
{
console
.
log
(
"
query distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
query distributedInfo:
"
+
JSON
.
stringify
(
distributedInfo
));
expect
(
distributedInfo
.
name
).
assertEqual
(
'
ZhangSan
'
);
expect
(
distributedInfo
.
id
).
assertEqual
(
distributedId
);
console
.
log
(
"
test query distribtued id end
"
);
done
();
})
})
})
/**
* @tc.number SUB_Account_distributedAccount_JS_API_0100
* @tc.name Test distributedAccount.getDistributedAccountAbility.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录