Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0418c010
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0418c010
编写于
3月 05, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 05, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2198 Add xts case to query distributed id
Merge pull request !2198 from 高曦/master_xts_account_0304
上级
226027fb
1d0a11a0
变更
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
浏览文件 @
0418c010
无法预览此类型文件
account/OsAccountTest_js/src/main/config.json
浏览文件 @
0418c010
...
...
@@ -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
浏览文件 @
0418c010
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录