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() {
*/
it
(
'
ActsDADeviceId_0100
'
,
0
,
async
function
(
done
){
console
.
log
(
"
====>ActsDADeviceId_0100 test query distribtued id start
"
);
const
distributedId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
//'12345'sha256的值
const
accountAbility
=
account
.
getDistributedAccountAbility
();
accountAbility
.
setOsAccountDistributedInfo
(
LOGININFO
,
(
err
)
=>
{
console
.
log
(
"
====>ActsDADeviceId_0100 set distributedInfo err:
"
+
JSON
.
stringify
(
err
));
...
...
@@ -49,12 +48,19 @@ export default function ActsDAGetSetTest() {
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo:
"
+
JSON
.
stringify
(
distributedInfo
));
expect
(
distributedInfo
.
name
).
assertEqual
(
'
ZhangSan
'
);
expect
(
distributedInfo
.
id
).
assertEqual
(
distributedId
);
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
();
expect
(
distributedInfo
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
let
uid
=
distributedInfo
.
id
accountAbility
.
getOsAccountDistributedInfo
((
err
,
distributedInfo
)
=>
{
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
====>ActsDADeviceId_0100 get distributedInfo:
"
+
JSON
.
stringify
(
distributedInfo
));
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() {
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 ccerr:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -205,7 +211,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
'
====>setOsAccountDistributedInfo_test002 get ccerr:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test002 get data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -262,7 +268,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfo_test004 query_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test004 query_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -303,7 +309,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>updateOsAccountDistributedInfo_test005 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>updateOsAccountDistributedInfo_test005 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -344,7 +350,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfo_test006 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test006 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -386,7 +392,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfo_test007 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test007 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -427,7 +433,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfo_test008 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test008 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -639,7 +645,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0100 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0100 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -680,7 +686,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0200 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfoByLocalId_test0200 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -762,7 +768,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0100 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0100 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -805,7 +811,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0200 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0200 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -852,7 +858,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0300 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0300 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -895,7 +901,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0400 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0400 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -938,7 +944,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0500 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0500 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -977,7 +983,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0600 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0600 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -1024,7 +1030,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0700 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0700 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -1067,7 +1073,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0800 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0800 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -1114,7 +1120,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0900 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_0900 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
@@ -1157,7 +1163,7 @@ export default function ActsDAGetSetTest() {
console
.
debug
(
"
====>DistributedAccountOptionalParameter_1000 get_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>DistributedAccountOptionalParameter_1000 get_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
expect
(
data
.
status
).
assertEqual
(
1
)
let
obj
=
{
id
:
'
12345
'
,
...
...
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
浏览文件 @
5675c987
...
...
@@ -42,7 +42,6 @@ export default function AccountTest() {
console
.
debug
(
'
====>ActsDistributedAccountDeviceId_0100 start====
'
)
try
{
console
.
log
(
"
====>test query distribtued id start
"
);
const
distributedId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
//'12345'sha256的值
const
accountAbility
=
account
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
LOGININFO
,
(
err
)
=>
{
console
.
log
(
"
====>update distributedInfo err:
"
+
JSON
.
stringify
(
err
));
...
...
@@ -50,13 +49,20 @@ export default function AccountTest() {
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
.
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
();
expect
(
distributedInfo
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
let
uid
=
distributedInfo
.
id
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
(
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() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test001 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
...
...
@@ -195,7 +201,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test002 data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
...
...
@@ -266,7 +272,7 @@ export default function AccountTest() {
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test004 query_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test004 query_data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
...
...
@@ -307,7 +313,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test005 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
...
...
@@ -352,7 +358,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test006 data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
...
...
@@ -393,7 +399,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test007 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
...
...
@@ -434,7 +440,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test008 data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
...
...
@@ -471,7 +477,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test009 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
...
...
@@ -508,7 +514,7 @@ export default function AccountTest() {
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test010 data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
expect
(
data
.
id
!==
'
ohosAnonymousUid
'
).
assertTrue
(
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
...
...
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountCheck.test.js
浏览文件 @
5675c987
...
...
@@ -33,7 +33,6 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 start====
"
);
var
AccountManager
=
osAccount
.
getAccountManager
();
console
.
debug
(
"
====>get os AccountManager finish====
"
);
const
deviceId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
{
...
...
@@ -46,7 +45,7 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
console
.
debug
(
"
====>queryDistributedVirtualDeviceId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>queryDistributedVirtualDeviceId deviceId:
"
+
id
);
expect
(
err
).
assertEqual
(
null
);
expect
(
id
).
assertEqual
(
deviceId
);
expect
(
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 end====
"
);
done
();
})
...
...
@@ -62,7 +61,6 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 start====
"
);
var
AccountManager
=
osAccount
.
getAccountManager
();
console
.
debug
(
"
====>get os AccountManager finish====
"
);
const
deviceId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
{
...
...
@@ -74,7 +72,7 @@ export default function ActsOsAccountThirdPartyTest_third_3() {
console
.
debug
(
"
====>queryDistributedVirtualDeviceId start====
"
);
var
id
=
await
AccountManager
.
queryDistributedVirtualDeviceId
();
console
.
debug
(
"
====>queryDistributedVirtualDeviceId:
"
+
id
);
expect
(
id
).
assertEqual
(
deviceId
);
expect
(
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 end====
"
);
done
();
})
...
...
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountIs.test.js
浏览文件 @
5675c987
...
...
@@ -29,7 +29,6 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 start====
"
);
var
AccountManager
=
osAccount
.
getAccountManager
();
console
.
debug
(
"
====>get os AccountManager finish====
"
);
const
deviceId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
{
...
...
@@ -42,7 +41,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
console
.
debug
(
"
====>getDistributedVirtualDeviceId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getDistributedVirtualDeviceId deviceId:
"
+
id
);
expect
(
err
).
assertEqual
(
null
);
expect
(
id
).
assertEqual
(
deviceId
);
expect
(
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 end====
"
);
done
();
})
...
...
@@ -58,7 +57,6 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 start====
"
);
var
AccountManager
=
osAccount
.
getAccountManager
();
console
.
debug
(
"
====>get os AccountManager finish====
"
);
const
deviceId
=
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
;
const
accountAbility
=
distributedAccount
.
getDistributedAccountAbility
();
accountAbility
.
updateOsAccountDistributedInfo
(
{
...
...
@@ -70,7 +68,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
console
.
debug
(
"
====>getDistributedVirtualDeviceId start====
"
);
var
id
=
await
AccountManager
.
getDistributedVirtualDeviceId
();
console
.
debug
(
"
====>getDistributedVirtualDeviceId:
"
+
id
);
expect
(
id
).
assertEqual
(
deviceId
);
expect
(
id
!==
'
ohosAnonymousUid
'
).
assertTrue
()
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 end====
"
);
done
();
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录