Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5675c987
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看板
未验证
提交
5675c987
编写于
8月 21, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 21, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9760 分布式账号用例修改
Merge pull request !9760 from liushuling/authenticationXTS
上级
bbabf558
405c7b78
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
59 addition
and
51 deletion
+59
-51
account/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js
...nt/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js
+32
-26
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
+23
-17
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountCheck.test.js
...untthirdpartytest/src/main/js/test/OsAccountCheck.test.js
+2
-4
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountIs.test.js
...ccountthirdpartytest/src/main/js/test/OsAccountIs.test.js
+2
-4
未找到文件。
account/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js
浏览文件 @
5675c987
...
@@ -41,7 +41,6 @@ export default function ActsDAGetSetTest() {
...
@@ -41,7 +41,6 @@ export default function ActsDAGetSetTest() {
*/
*/
it
(
'
ActsDADeviceId_0100
'
,
0
,
async
function
(
done
){
it
(
'
ActsDADeviceId_0100
'
,
0
,
async
function
(
done
){
console
.
log
(
"
====>ActsDADeviceId_0100 test query distribtued id start
"
);
console
.
log
(
"
====>ActsDADeviceId_0100 test query distribtued id start
"
);
const
distributedId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
//'12345'sha256的值
const
accountAbility
=
account
.
getDistributedAccountAbility
();
const
accountAbility
=
account
.
getDistributedAccountAbility
();
accountAbility
.
setOsAccountDistributedInfo
(
LOGININFO
,
(
err
)
=>
{
accountAbility
.
setOsAccountDistributedInfo
(
LOGININFO
,
(
err
)
=>
{
console
.
log
(
"
====>ActsDADeviceId_0100 set distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
====>ActsDADeviceId_0100 set distributedInfo err:
"
+
JSON
.
stringify
(
err
));
...
@@ -49,12 +48,19 @@ export default function ActsDAGetSetTest() {
...
@@ -49,12 +48,19 @@ export default function ActsDAGetSetTest() {
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo:
"
+
JSON
.
stringify
(
distributedInfo
));
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo:
"
+
JSON
.
stringify
(
distributedInfo
));
expect
(
distributedInfo
.
name
).
assertEqual
(
'
ZhangSan
'
);
expect
(
distributedInfo
.
name
).
assertEqual
(
'
ZhangSan
'
);
expect
(
distributedInfo
.
id
).
assertEqual
(
distributedId
);
expect
(
distributedInfo
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
accountAbility
.
setOsAccountDistributedInfo
(
LOGOUTINFO
,
(
err
)
=>
{
let
uid
=
distributedInfo
.
id
console
.
debug
(
'
====>ActsDADeviceId_0100 logout_result:
'
+
JSON
.
stringify
(
err
))
accountAbility
.
getOsAccountDistributedInfo
((
err
,
distributedInfo
)
=>
{
expect
(
err
).
assertEqual
(
null
)
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
====>test query distribtued id end
"
);
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo:
"
+
JSON
.
stringify
(
distributedInfo
));
done
();
expect
(
distributedInfo
.
name
).
assertEqual
(
'
ZhangSan
'
);
expect
(
distributedInfo
.
id
).
assertEqual
(
uid
)
accountAbility
.
setOsAccountDistributedInfo
(
LOGOUTINFO
,
(
err
)
=>
{
console
.
debug
(
'
====>ActsDADeviceId_0100 logout_result:
'
+
JSON
.
stringify
(
err
))
expect
(
err
).
assertEqual
(
null
)
console
.
log
(
"
====>test query distribtued id end
"
);
done
();
})
})
})
})
})
})
})
...
@@ -162,7 +168,7 @@ export default function ActsDAGetSetTest() {
...
@@ -162,7 +168,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 ccerr:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 ccerr:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 data:
'
+
JSON
.
stringify
(
data
))
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -205,7 +211,7 @@ export default function ActsDAGetSetTest() {
...
@@ -205,7 +211,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
'
====>setOsAccountDistributedInfo_test002 get ccerr:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
'
====>setOsAccountDistributedInfo_test002 get ccerr:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test002 get data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test002 get data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -262,7 +268,7 @@ export default function ActsDAGetSetTest() {
...
@@ -262,7 +268,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfo_test004 query_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test004 query_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test004 query_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test004 query_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -303,7 +309,7 @@ export default function ActsDAGetSetTest() {
...
@@ -303,7 +309,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>updateOsAccountDistributedInfo_test005 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>updateOsAccountDistributedInfo_test005 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>updateOsAccountDistributedInfo_test005 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>updateOsAccountDistributedInfo_test005 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -344,7 +350,7 @@ export default function ActsDAGetSetTest() {
...
@@ -344,7 +350,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfo_test006 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test006 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test006 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test006 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -386,7 +392,7 @@ export default function ActsDAGetSetTest() {
...
@@ -386,7 +392,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfo_test007 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test007 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test007 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test007 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -427,7 +433,7 @@ export default function ActsDAGetSetTest() {
...
@@ -427,7 +433,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfo_test008 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test008 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test008 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test008 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -639,7 +645,7 @@ export default function ActsDAGetSetTest() {
...
@@ -639,7 +645,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0100 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0100 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0100 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0100 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -680,7 +686,7 @@ export default function ActsDAGetSetTest() {
...
@@ -680,7 +686,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0200 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0200 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0200 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0200 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -762,7 +768,7 @@ export default function ActsDAGetSetTest() {
...
@@ -762,7 +768,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0100 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0100 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0100 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0100 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -805,7 +811,7 @@ export default function ActsDAGetSetTest() {
...
@@ -805,7 +811,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0200 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0200 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0200 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0200 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -852,7 +858,7 @@ export default function ActsDAGetSetTest() {
...
@@ -852,7 +858,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0300 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0300 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0300 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0300 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -895,7 +901,7 @@ export default function ActsDAGetSetTest() {
...
@@ -895,7 +901,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0400 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0400 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0400 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0400 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -938,7 +944,7 @@ export default function ActsDAGetSetTest() {
...
@@ -938,7 +944,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0500 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0500 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0500 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0500 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -977,7 +983,7 @@ export default function ActsDAGetSetTest() {
...
@@ -977,7 +983,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0600 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0600 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0600 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0600 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -1024,7 +1030,7 @@ export default function ActsDAGetSetTest() {
...
@@ -1024,7 +1030,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0700 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0700 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0700 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0700 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -1067,7 +1073,7 @@ export default function ActsDAGetSetTest() {
...
@@ -1067,7 +1073,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0800 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0800 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0800 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0800 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -1114,7 +1120,7 @@ export default function ActsDAGetSetTest() {
...
@@ -1114,7 +1120,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0900 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0900 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0900 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0900 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
@@ -1157,7 +1163,7 @@ export default function ActsDAGetSetTest() {
...
@@ -1157,7 +1163,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_1000 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_1000 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_1000 get_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_1000 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
...
...
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
浏览文件 @
5675c987
...
@@ -42,7 +42,6 @@ export default function AccountTest() {
...
@@ -42,7 +42,6 @@ export default function AccountTest() {
console
.
debug
(
'
====>ActsDistributedAccountDeviceId_0100 start====
'
)
console
.
debug
(
'
====>ActsDistributedAccountDeviceId_0100 start====
'
)
try
{
try
{
console
.
log
(
"
====>test query distribtued id start
"
);
console
.
log
(
"
====>test query distribtued id start
"
);
const
distributedId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
//'12345'sha256的值
const
accountAbility
=
account
.
getDistributedAccountAbility
();
const
accountAbility
=
account
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
LOGININFO
,
(
err
)
=>
{
accountAbility
.
updateOsAccountDistributedInfo
(
LOGININFO
,
(
err
)
=>
{
console
.
log
(
"
====>update distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
====>update distributedInfo err:
"
+
JSON
.
stringify
(
err
));
...
@@ -50,13 +49,20 @@ export default function AccountTest() {
...
@@ -50,13 +49,20 @@ export default function AccountTest() {
console
.
log
(
"
====>query distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
====>query distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
====>query distributedInfo:
"
+
JSON
.
stringify
(
distributedInfo
));
console
.
log
(
"
====>query distributedInfo:
"
+
JSON
.
stringify
(
distributedInfo
));
expect
(
distributedInfo
.
name
).
assertEqual
(
'
ZhangSan
'
);
expect
(
distributedInfo
.
name
).
assertEqual
(
'
ZhangSan
'
);
expect
(
distributedInfo
.
id
).
assertEqual
(
distributedId
);
expect
(
distributedInfo
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
console
.
debug
(
'
success
'
)
let
uid
=
distributedInfo
.
id
accountAbility
.
updateOsAccountDistributedInfo
(
LOGOUTINFO
,
(
err
)
=>
{
accountAbility
.
queryOsAccountDistributedInfo
((
err
,
distributedInfo
)
=>
{
console
.
debug
(
'
====>ActsDistributedAccountDeviceId_0100 logout_result:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
"
====>query distributedInfo err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
)
console
.
log
(
"
====>query distributedInfo:
"
+
JSON
.
stringify
(
distributedInfo
));
console
.
log
(
"
====>test query distribtued id end
"
);
expect
(
distributedInfo
.
name
).
assertEqual
(
'
ZhangSan
'
);
done
();
expect
(
distributedInfo
.
id
).
assertEqual
(
uid
)
console
.
debug
(
'
success
'
)
accountAbility
.
updateOsAccountDistributedInfo
(
LOGOUTINFO
,
(
err
)
=>
{
console
.
debug
(
'
====>ActsDistributedAccountDeviceId_0100 logout_result:
'
+
JSON
.
stringify
(
err
))
expect
(
err
).
assertEqual
(
undefined
)
console
.
log
(
"
====>test query distribtued id end
"
);
done
();
})
})
})
})
})
})
})
...
@@ -157,7 +163,7 @@ export default function AccountTest() {
...
@@ -157,7 +163,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test001 data:
'
+
JSON
.
stringify
(
data
))
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test001 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
...
@@ -195,7 +201,7 @@ export default function AccountTest() {
...
@@ -195,7 +201,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test002 data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test002 data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
...
@@ -266,7 +272,7 @@ export default function AccountTest() {
...
@@ -266,7 +272,7 @@ export default function AccountTest() {
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test004 query_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test004 query_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test004 query_data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test004 query_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
...
@@ -307,7 +313,7 @@ export default function AccountTest() {
...
@@ -307,7 +313,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test005 data:
'
+
JSON
.
stringify
(
data
))
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test005 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
...
@@ -352,7 +358,7 @@ export default function AccountTest() {
...
@@ -352,7 +358,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test006 data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test006 data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
...
@@ -393,7 +399,7 @@ export default function AccountTest() {
...
@@ -393,7 +399,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test007 data:
'
+
JSON
.
stringify
(
data
))
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test007 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
...
@@ -434,7 +440,7 @@ export default function AccountTest() {
...
@@ -434,7 +440,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test008 data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test008 data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
...
@@ -471,7 +477,7 @@ export default function AccountTest() {
...
@@ -471,7 +477,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test009 data:
'
+
JSON
.
stringify
(
data
))
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test009 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
...
@@ -508,7 +514,7 @@ export default function AccountTest() {
...
@@ -508,7 +514,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test010 data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test010 data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
let
obj
=
{
id
:
'
12345
'
,
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
...
...
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountCheck.test.js
浏览文件 @
5675c987
...
@@ -33,7 +33,6 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
...
@@ -33,7 +33,6 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 start====
"
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 start====
"
);
var
AccountManager
=
osAccount
.
getAccountManager
();
var
AccountManager
=
osAccount
.
getAccountManager
();
console
.
debug
(
"
====>get os AccountManager finish====
"
);
console
.
debug
(
"
====>get os AccountManager finish====
"
);
const
deviceId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
accountAbility
.
updateOsAccountDistributedInfo
(
{
{
...
@@ -46,7 +45,7 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
...
@@ -46,7 +45,7 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
console
.
debug
(
"
====>queryDistributedVirtualDeviceId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>queryDistributedVirtualDeviceId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>queryDistributedVirtualDeviceId deviceId:
"
+
id
);
console
.
debug
(
"
====>queryDistributedVirtualDeviceId deviceId:
"
+
id
);
expect
(
err
).
assertEqual
(
null
);
expect
(
err
).
assertEqual
(
null
);
expect
(
id
).
assertEqual
(
deviceId
);
expect
(
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 end====
"
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 end====
"
);
done
();
done
();
})
})
...
@@ -62,7 +61,6 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
...
@@ -62,7 +61,6 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 start====
"
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 start====
"
);
var
AccountManager
=
osAccount
.
getAccountManager
();
var
AccountManager
=
osAccount
.
getAccountManager
();
console
.
debug
(
"
====>get os AccountManager finish====
"
);
console
.
debug
(
"
====>get os AccountManager finish====
"
);
const
deviceId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
accountAbility
.
updateOsAccountDistributedInfo
(
{
{
...
@@ -74,7 +72,7 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
...
@@ -74,7 +72,7 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
console
.
debug
(
"
====>queryDistributedVirtualDeviceId start====
"
);
console
.
debug
(
"
====>queryDistributedVirtualDeviceId start====
"
);
var
id
=
await
AccountManager
.
queryDistributedVirtualDeviceId
();
var
id
=
await
AccountManager
.
queryDistributedVirtualDeviceId
();
console
.
debug
(
"
====>queryDistributedVirtualDeviceId:
"
+
id
);
console
.
debug
(
"
====>queryDistributedVirtualDeviceId:
"
+
id
);
expect
(
id
).
assertEqual
(
deviceId
);
expect
(
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 end====
"
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 end====
"
);
done
();
done
();
})
})
...
...
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountIs.test.js
浏览文件 @
5675c987
...
@@ -29,7 +29,6 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
...
@@ -29,7 +29,6 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 start====
"
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 start====
"
);
var
AccountManager
=
osAccount
.
getAccountManager
();
var
AccountManager
=
osAccount
.
getAccountManager
();
console
.
debug
(
"
====>get os AccountManager finish====
"
);
console
.
debug
(
"
====>get os AccountManager finish====
"
);
const
deviceId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
accountAbility
.
updateOsAccountDistributedInfo
(
{
{
...
@@ -42,7 +41,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
...
@@ -42,7 +41,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
console
.
debug
(
"
====>getDistributedVirtualDeviceId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getDistributedVirtualDeviceId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getDistributedVirtualDeviceId deviceId:
"
+
id
);
console
.
debug
(
"
====>getDistributedVirtualDeviceId deviceId:
"
+
id
);
expect
(
err
).
assertEqual
(
null
);
expect
(
err
).
assertEqual
(
null
);
expect
(
id
).
assertEqual
(
deviceId
);
expect
(
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 end====
"
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 end====
"
);
done
();
done
();
})
})
...
@@ -58,7 +57,6 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
...
@@ -58,7 +57,6 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 start====
"
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 start====
"
);
var
AccountManager
=
osAccount
.
getAccountManager
();
var
AccountManager
=
osAccount
.
getAccountManager
();
console
.
debug
(
"
====>get os AccountManager finish====
"
);
console
.
debug
(
"
====>get os AccountManager finish====
"
);
const
deviceId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
accountAbility
.
updateOsAccountDistributedInfo
(
{
{
...
@@ -70,7 +68,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
...
@@ -70,7 +68,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
console
.
debug
(
"
====>getDistributedVirtualDeviceId start====
"
);
console
.
debug
(
"
====>getDistributedVirtualDeviceId start====
"
);
var
id
=
await
AccountManager
.
getDistributedVirtualDeviceId
();
var
id
=
await
AccountManager
.
getDistributedVirtualDeviceId
();
console
.
debug
(
"
====>getDistributedVirtualDeviceId:
"
+
id
);
console
.
debug
(
"
====>getDistributedVirtualDeviceId:
"
+
id
);
expect
(
id
).
assertEqual
(
deviceId
);
expect
(
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 end====
"
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 end====
"
);
done
();
done
();
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录