Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
521c17af
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看板
提交
521c17af
编写于
6月 03, 2023
作者:
Z
zhaimengchao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【Account】【Master】DistributedAccount Xts Stability Issues Fix
Signed-off-by:
N
zhaimengchao
<
zhaimengchao@huawei.com
>
上级
61bbb547
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
25 deletion
+22
-25
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
+22
-25
未找到文件。
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
浏览文件 @
521c17af
...
@@ -154,7 +154,7 @@ export default function AccountTest() {
...
@@ -154,7 +154,7 @@ export default function AccountTest() {
};
};
try
{
try
{
await
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
await
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
accountAbility
.
queryOsAccountDistributedInfo
(
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
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
...
@@ -163,15 +163,12 @@ export default function AccountTest() {
...
@@ -163,15 +163,12 @@ export default function AccountTest() {
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOUT
'
event
:
'
Ohos.account.event.LOGOUT
'
};
};
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
a
wait
a
ccountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
expect
(
err
).
assertEqual
(
undefined
)
expect
(
err
).
assertEqual
(
undefined
)
done
();
});
});
});
});
});
});
accountAbility
.
queryOsAccountDistributedInfo
(
function
(
data
)
{
expect
(
data
).
assertEqual
(
undefined
)
done
();
})
}
catch
(
err
){
}
catch
(
err
){
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test001 err:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test001 err:
'
+
JSON
.
stringify
(
err
))
expect
().
assertFail
()
expect
().
assertFail
()
...
@@ -195,7 +192,7 @@ export default function AccountTest() {
...
@@ -195,7 +192,7 @@ export default function AccountTest() {
};
};
try
{
try
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
()
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
()
{
accountAbility
.
queryOsAccountDistributedInfo
(
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
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
...
@@ -204,8 +201,8 @@ export default function AccountTest() {
...
@@ -204,8 +201,8 @@ export default function AccountTest() {
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOUT
'
event
:
'
Ohos.account.event.LOGOUT
'
};
};
a
ccountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
a
wait
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
expect
(
data
).
assertEqual
(
undefined
)
expect
(
err
).
assertEqual
(
undefined
)
done
();
done
();
});
});
});
});
...
@@ -233,9 +230,9 @@ export default function AccountTest() {
...
@@ -233,9 +230,9 @@ export default function AccountTest() {
scalableData
:
data
scalableData
:
data
};
};
try
{
try
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
(
result
)
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
async
function
(
result
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test003 update_err:
"
+
JSON
.
stringify
(
result
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test003 update_err:
"
+
JSON
.
stringify
(
result
))
accountAbility
.
queryOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
a
wait
a
ccountAbility
.
queryOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test003 data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test003 data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
"
ohosAnonymousName
"
)
expect
(
data
.
name
).
assertEqual
(
"
ohosAnonymousName
"
)
done
();
done
();
...
@@ -265,7 +262,7 @@ export default function AccountTest() {
...
@@ -265,7 +262,7 @@ export default function AccountTest() {
try
{
try
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
(
err
)
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
(
err
)
{
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test004 update_err:
"
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>account_updateOsAccountDistributedInfo_test004 update_err:
"
+
JSON
.
stringify
(
err
))
accountAbility
.
queryOsAccountDistributedInfo
(
function
(
err
,
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
async
function
(
err
,
data
)
{
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
'
)
...
@@ -275,7 +272,7 @@ export default function AccountTest() {
...
@@ -275,7 +272,7 @@ export default function AccountTest() {
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOFF
'
event
:
'
Ohos.account.event.LOGOFF
'
};
};
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
a
wait
a
ccountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
expect
(
err
).
assertEqual
(
undefined
)
expect
(
err
).
assertEqual
(
undefined
)
done
();
done
();
});
});
...
@@ -307,7 +304,7 @@ export default function AccountTest() {
...
@@ -307,7 +304,7 @@ export default function AccountTest() {
};
};
try
{
try
{
await
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
await
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
accountAbility
.
queryOsAccountDistributedInfo
(
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
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
...
@@ -320,7 +317,7 @@ export default function AccountTest() {
...
@@ -320,7 +317,7 @@ export default function AccountTest() {
avatar
:
undefined
,
avatar
:
undefined
,
status
:
undefined
status
:
undefined
};
};
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
a
wait
a
ccountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
expect
(
err
).
assertEqual
(
undefined
)
expect
(
err
).
assertEqual
(
undefined
)
done
()
done
()
});
});
...
@@ -352,7 +349,7 @@ export default function AccountTest() {
...
@@ -352,7 +349,7 @@ export default function AccountTest() {
};
};
try
{
try
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
()
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
()
{
accountAbility
.
queryOsAccountDistributedInfo
(
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
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
...
@@ -361,7 +358,7 @@ export default function AccountTest() {
...
@@ -361,7 +358,7 @@ export default function AccountTest() {
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOUT
'
event
:
'
Ohos.account.event.LOGOUT
'
};
};
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
a
wait
a
ccountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
expect
(
data
).
assertEqual
(
undefined
)
expect
(
data
).
assertEqual
(
undefined
)
done
();
done
();
});
});
...
@@ -393,7 +390,7 @@ export default function AccountTest() {
...
@@ -393,7 +390,7 @@ export default function AccountTest() {
};
};
try
{
try
{
await
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
await
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
accountAbility
.
queryOsAccountDistributedInfo
(
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
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
...
@@ -402,7 +399,7 @@ export default function AccountTest() {
...
@@ -402,7 +399,7 @@ export default function AccountTest() {
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOUT
'
event
:
'
Ohos.account.event.LOGOUT
'
};
};
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
a
wait
a
ccountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
expect
(
err
).
assertEqual
(
undefined
)
expect
(
err
).
assertEqual
(
undefined
)
done
()
done
()
});
});
...
@@ -434,7 +431,7 @@ export default function AccountTest() {
...
@@ -434,7 +431,7 @@ export default function AccountTest() {
};
};
try
{
try
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
()
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
()
{
accountAbility
.
queryOsAccountDistributedInfo
(
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
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
...
@@ -443,7 +440,7 @@ export default function AccountTest() {
...
@@ -443,7 +440,7 @@ export default function AccountTest() {
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOUT
'
event
:
'
Ohos.account.event.LOGOUT
'
};
};
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
a
wait
a
ccountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
expect
(
data
).
assertEqual
(
undefined
)
expect
(
data
).
assertEqual
(
undefined
)
done
();
done
();
});
});
...
@@ -471,7 +468,7 @@ export default function AccountTest() {
...
@@ -471,7 +468,7 @@ export default function AccountTest() {
};
};
try
{
try
{
await
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
await
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
accountAbility
.
queryOsAccountDistributedInfo
(
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
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
...
@@ -480,7 +477,7 @@ export default function AccountTest() {
...
@@ -480,7 +477,7 @@ export default function AccountTest() {
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOUT
'
event
:
'
Ohos.account.event.LOGOUT
'
};
};
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
a
wait
a
ccountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
expect
(
err
).
assertEqual
(
undefined
)
expect
(
err
).
assertEqual
(
undefined
)
done
()
done
()
});
});
...
@@ -508,7 +505,7 @@ export default function AccountTest() {
...
@@ -508,7 +505,7 @@ export default function AccountTest() {
};
};
try
{
try
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
()
{
accountAbility
.
updateOsAccountDistributedInfo
(
obj
,
function
()
{
accountAbility
.
queryOsAccountDistributedInfo
(
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
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
...
@@ -517,7 +514,7 @@ export default function AccountTest() {
...
@@ -517,7 +514,7 @@ export default function AccountTest() {
name
:
'
ZhangSan
'
,
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOUT
'
event
:
'
Ohos.account.event.LOGOUT
'
};
};
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
a
wait
a
ccountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
expect
(
data
).
assertEqual
(
undefined
)
expect
(
data
).
assertEqual
(
undefined
)
done
();
done
();
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录