Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1ac91748
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,发现更多精彩内容 >>
提交
1ac91748
编写于
12月 05, 2022
作者:
J
jinhaihw
提交者:
何海涛
12月 06, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed
ba66a79a
from
https://gitee.com/murphy1984/acts/pulls/6787
account子系统用例超时 Signed-off-by:
N
jinhaihw
<
jinhai2@huawei.com
>
上级
c6a77b72
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
55 addition
and
53 deletion
+55
-53
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountGet.test.js
...countthirdpartytest/src/main/js/test/OsAccountGet.test.js
+25
-24
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountQuery.test.js
...untthirdpartytest/src/main/js/test/OsAccountQuery.test.js
+30
-29
未找到文件。
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountGet.test.js
浏览文件 @
1ac91748
...
@@ -416,7 +416,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -416,7 +416,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
* @tc.name : getCreatedOsAccountsCount callback
* @tc.name : getCreatedOsAccountsCount callback
* @tc.desc : Verify to obtain the number os all os accounts created
* @tc.desc : Verify to obtain the number os all os accounts created
*/
*/
it
(
'
ActsOsAccountGetCount_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
ActsOsAccountGetCount_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountGetCount_0100 start====
"
);
console
.
debug
(
"
====>ActsOsAccountGetCount_0100 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
osAccountManager
=
osaccount
.
getAccountManager
();
console
.
debug
(
"
====>get AccountManager finish====
"
);
console
.
debug
(
"
====>get AccountManager finish====
"
);
...
@@ -434,17 +434,17 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -434,17 +434,17 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
localIdFir
=
data
.
localId
;
localIdFir
=
data
.
localId
;
expect
(
err
).
assertEqual
(
null
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
localName
).
assertEqual
(
"
osAccountNameIdSerialE
"
);
expect
(
data
.
localName
).
assertEqual
(
"
osAccountNameIdSerialE
"
);
osAccountManager
.
createOsAccount
(
"
osAccountIdSerialF
"
,
osaccount
.
OsAccountType
.
NORMAL
,
(
err
,
data
)
=>
{
//
osAccountManager.createOsAccount("osAccountIdSerialF", osaccount.OsAccountType.NORMAL, (err, data)=>{
console
.
debug
(
"
====>create second os account err:
"
+
JSON
.
stringify
(
err
));
//
console.debug("====>create second os account err: " + JSON.stringify(err));
console
.
debug
(
"
====>create second os account OsAccountInfo:
"
+
JSON
.
stringify
(
data
));
//
console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(data));
localIdSec
=
data
.
localId
;
//
localIdSec = data.localId;
expect
(
err
).
assertEqual
(
null
);
//
expect(err).assertEqual(null);
expect
(
data
.
localName
).
assertEqual
(
"
osAccountIdSerialF
"
);
//
expect(data.localName).assertEqual("osAccountIdSerialF");
osAccountManager
.
getCreatedOsAccountsCount
((
err
,
count
)
=>
{
osAccountManager
.
getCreatedOsAccountsCount
((
err
,
count
)
=>
{
console
.
debug
(
"
====>obtains the number of all os accounts created err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>obtains the number of all os accounts created err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>obtains the number of all os accounts created count:
"
+
count
);
console
.
debug
(
"
====>obtains the number of all os accounts created count:
"
+
count
);
expect
(
err
).
assertEqual
(
null
);
expect
(
err
).
assertEqual
(
null
);
count
=
count
-
2
;
count
=
count
-
1
;
expect
(
count
).
assertEqual
(
obtainCount
);
expect
(
count
).
assertEqual
(
obtainCount
);
osAccountManager
.
removeOsAccount
(
localIdFir
,
(
err
)
=>
{
osAccountManager
.
removeOsAccount
(
localIdFir
,
(
err
)
=>
{
console
.
debug
(
"
====>remove localId:
"
+
localIdFir
+
"
err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>remove localId:
"
+
localIdFir
+
"
err:
"
+
JSON
.
stringify
(
err
));
...
@@ -453,18 +453,19 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -453,18 +453,19 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
console
.
debug
(
"
====>obtains the number accounts created err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>obtains the number accounts created err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>obtains the number accounts created data:
"
+
data
);
console
.
debug
(
"
====>obtains the number accounts created data:
"
+
data
);
expect
(
err
).
assertEqual
(
null
);
expect
(
err
).
assertEqual
(
null
);
data
=
data
-
1
;
// data = data
;
expect
(
data
).
assertEqual
(
obtainCount
);
expect
(
data
).
assertEqual
(
obtainCount
);
osAccountManager
.
removeOsAccount
(
localIdSec
,
(
err
)
=>
{
// osAccountManager.removeOsAccount(localIdSec, (err)=>{
console
.
debug
(
"
====>remove localId:
"
+
localIdSec
+
"
err:
"
+
JSON
.
stringify
(
err
));
// console.debug("====>remove localId: " + localIdSec + " err:" + JSON.stringify(err));
expect
(
err
).
assertEqual
(
null
);
// expect(err).assertEqual(null);
console
.
debug
(
"
====>ActsOsAccountGetCount_0100 end====
"
);
// })
console
.
debug
(
"
====>ActsOsAccountGetCount_0100 end====
"
);
done
();
done
();
})
})
})
})
})
})
})
})
//
})
})
})
})
})
})
})
...
@@ -484,22 +485,22 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -484,22 +485,22 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
console
.
debug
(
"
====>create first os account OsAccountInfo:
"
+
JSON
.
stringify
(
osAccountFir
));
console
.
debug
(
"
====>create first os account OsAccountInfo:
"
+
JSON
.
stringify
(
osAccountFir
));
var
localIdFir
=
osAccountFir
.
localId
;
var
localIdFir
=
osAccountFir
.
localId
;
expect
(
osAccountFir
.
localName
).
assertEqual
(
"
osAccountIdSerialG
"
);
expect
(
osAccountFir
.
localName
).
assertEqual
(
"
osAccountIdSerialG
"
);
var
osAccountSec
=
await
osAccountManager
.
createOsAccount
(
"
osAccountIdSerialH
"
,
osaccount
.
OsAccountType
.
NORMAL
);
//
var osAccountSec = await osAccountManager.createOsAccount("osAccountIdSerialH", osaccount.OsAccountType.NORMAL);
console
.
debug
(
"
====>create second os account OsAccountInfo:
"
+
JSON
.
stringify
(
osAccountSec
));
//
console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(osAccountSec));
var
localIdSec
=
osAccountSec
.
localId
;
//
var localIdSec = osAccountSec.localId;
expect
(
osAccountSec
.
localName
).
assertEqual
(
"
osAccountIdSerialH
"
);
//
expect(osAccountSec.localName).assertEqual("osAccountIdSerialH");
var
countFir
=
await
osAccountManager
.
getCreatedOsAccountsCount
();
var
countFir
=
await
osAccountManager
.
getCreatedOsAccountsCount
();
console
.
debug
(
"
====>obtains the number of all os accounts created count:
"
+
countFir
);
console
.
debug
(
"
====>obtains the number of all os accounts created count:
"
+
countFir
);
countFir
=
countFir
-
2
;
countFir
=
countFir
-
1
;
expect
(
countFir
).
assertEqual
(
obtainCount
);
expect
(
countFir
).
assertEqual
(
obtainCount
);
await
osAccountManager
.
removeOsAccount
(
localIdFir
);
await
osAccountManager
.
removeOsAccount
(
localIdFir
);
console
.
debug
(
"
====>remove localId:
"
+
localIdFir
);
console
.
debug
(
"
====>remove localId:
"
+
localIdFir
);
var
countSec
=
await
osAccountManager
.
getCreatedOsAccountsCount
();
var
countSec
=
await
osAccountManager
.
getCreatedOsAccountsCount
();
console
.
debug
(
"
====>obtains the number accounts created count:
"
+
countSec
);
console
.
debug
(
"
====>obtains the number accounts created count:
"
+
countSec
);
countSec
=
countSec
-
1
;
// countSec = countSec
;
expect
(
countSec
).
assertEqual
(
obtainCount
);
expect
(
countSec
).
assertEqual
(
obtainCount
);
await
osAccountManager
.
removeOsAccount
(
localIdSec
);
//
await osAccountManager.removeOsAccount(localIdSec);
console
.
debug
(
"
====>remove localId:
"
+
localIdSec
);
//
console.debug("====>remove localId: " + localIdSec);
console
.
debug
(
"
====>ActsOsAccountGetCount_0200 end====
"
);
console
.
debug
(
"
====>ActsOsAccountGetCount_0200 end====
"
);
done
();
done
();
})
})
...
...
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountQuery.test.js
浏览文件 @
1ac91748
...
@@ -418,7 +418,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() {
...
@@ -418,7 +418,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() {
* @tc.name : getOsAccountCount callback
* @tc.name : getOsAccountCount callback
* @tc.desc : Verify to obtain the number os all os accounts created
* @tc.desc : Verify to obtain the number os all os accounts created
*/
*/
it
(
'
ActsOsAccountQueryCounts_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
ActsOsAccountQueryCounts_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountQueryCounts_0100 start====
"
);
console
.
debug
(
"
====>ActsOsAccountQueryCounts_0100 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
osAccountManager
=
osaccount
.
getAccountManager
();
console
.
debug
(
"
====>get AccountManager finish====
"
);
console
.
debug
(
"
====>get AccountManager finish====
"
);
...
@@ -436,37 +436,37 @@ export default function ActsOsAccountThirdPartyTest_third_4() {
...
@@ -436,37 +436,37 @@ export default function ActsOsAccountThirdPartyTest_third_4() {
localIdFir
=
data
.
localId
;
localIdFir
=
data
.
localId
;
expect
(
err
).
assertEqual
(
null
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
localName
).
assertEqual
(
"
osAccountNameIdSerialE
"
);
expect
(
data
.
localName
).
assertEqual
(
"
osAccountNameIdSerialE
"
);
osAccountManager
.
createOsAccount
(
"
osAccountIdSerialF
"
,
osaccount
.
OsAccountType
.
NORMAL
,
(
err
,
data
)
=>
{
//
osAccountManager.createOsAccount("osAccountIdSerialF", osaccount.OsAccountType.NORMAL, (err, data)=>{
console
.
debug
(
"
====>create second os account err:
"
+
JSON
.
stringify
(
err
));
//
console.debug("====>create second os account err: " + JSON.stringify(err));
console
.
debug
(
"
====>create second os account OsAccountInfo:
"
+
JSON
.
stringify
(
data
));
//
console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(data));
localIdSec
=
data
.
localId
;
//
localIdSec = data.localId;
expect
(
err
).
assertEqual
(
null
);
//
expect(err).assertEqual(null);
expect
(
data
.
localName
).
assertEqual
(
"
osAccountIdSerialF
"
);
//
expect(data.localName).assertEqual("osAccountIdSerialF");
osAccountManager
.
getOsAccountCount
((
err
,
count
)
=>
{
osAccountManager
.
getOsAccountCount
((
err
,
count
)
=>
{
console
.
debug
(
"
====>obtains the number of all os accounts created err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>obtains the number of all os accounts created err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>obtains the number of all os accounts created count:
"
+
count
);
console
.
debug
(
"
====>obtains the number of all os accounts created count:
"
+
count
);
expect
(
err
).
assertEqual
(
null
);
expect
(
err
).
assertEqual
(
null
);
count
=
count
-
2
;
count
=
count
-
1
;
expect
(
count
).
assertEqual
(
obtainCount
);
expect
(
count
).
assertEqual
(
obtainCount
);
osAccountManager
.
removeOsAccount
(
localIdFir
,
(
err
)
=>
{
osAccountManager
.
removeOsAccount
(
localIdFir
,
(
err
)
=>
{
console
.
debug
(
"
====>remove localId:
"
+
localIdFir
+
"
err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>remove localId:
"
+
localIdFir
+
"
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
expect
(
err
).
assertEqual
(
null
);
osAccountManager
.
getOsAccountCount
((
err
,
data
)
=>
{
osAccountManager
.
getOsAccountCount
((
err
,
data
)
=>
{
console
.
debug
(
"
====>obtains the number accounts created err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>obtains the number accounts created err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>obtains the number accounts created data:
"
+
data
);
console
.
debug
(
"
====>obtains the number accounts created data:
"
+
data
);
expect
(
err
).
assertEqual
(
null
);
expect
(
err
).
assertEqual
(
null
);
data
=
data
-
1
;
//
data = data - 1;
expect
(
data
).
assertEqual
(
obtainCount
);
expect
(
data
).
assertEqual
(
obtainCount
);
osAccountManager
.
removeOsAccount
(
localIdSec
,
(
err
)
=>
{
//
osAccountManager.removeOsAccount(localIdSec, (err)=>{
console
.
debug
(
"
====>remove localId:
"
+
localIdSec
+
"
err:
"
+
JSON
.
stringify
(
err
));
//
console.debug("====>remove localId: " + localIdSec + " err:" + JSON.stringify(err));
expect
(
err
).
assertEqual
(
null
);
//
expect(err).assertEqual(null);
console
.
debug
(
"
====>ActsOsAccountQueryCounts_0100 end====
"
);
console
.
debug
(
"
====>ActsOsAccountQueryCounts_0100 end====
"
);
done
();
done
();
})
//
})
})
})
})
})
})
})
})
//
})
})
})
})
})
})
})
...
@@ -486,26 +486,27 @@ export default function ActsOsAccountThirdPartyTest_third_4() {
...
@@ -486,26 +486,27 @@ export default function ActsOsAccountThirdPartyTest_third_4() {
console
.
debug
(
"
====>create first os account OsAccountInfo:
"
+
JSON
.
stringify
(
osAccountFir
));
console
.
debug
(
"
====>create first os account OsAccountInfo:
"
+
JSON
.
stringify
(
osAccountFir
));
var
localIdFir
=
osAccountFir
.
localId
;
var
localIdFir
=
osAccountFir
.
localId
;
expect
(
osAccountFir
.
localName
).
assertEqual
(
"
osAccountIdSerialG
"
);
expect
(
osAccountFir
.
localName
).
assertEqual
(
"
osAccountIdSerialG
"
);
var
osAccountSec
=
await
osAccountManager
.
createOsAccount
(
"
osAccountIdSerialH
"
,
osaccount
.
OsAccountType
.
NORMAL
);
//
var osAccountSec = await osAccountManager.createOsAccount("osAccountIdSerialH", osaccount.OsAccountType.NORMAL);
console
.
debug
(
"
====>create second os account OsAccountInfo:
"
+
JSON
.
stringify
(
osAccountSec
));
//
console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(osAccountSec));
var
localIdSec
=
osAccountSec
.
localId
;
//
var localIdSec = osAccountSec.localId;
expect
(
osAccountSec
.
localName
).
assertEqual
(
"
osAccountIdSerialH
"
);
//
expect(osAccountSec.localName).assertEqual("osAccountIdSerialH");
var
countFir
=
await
osAccountManager
.
getOsAccountCount
();
var
countFir
=
await
osAccountManager
.
getOsAccountCount
();
console
.
debug
(
"
====>obtains the number of all os accounts created count:
"
+
countFir
);
console
.
debug
(
"
====>obtains the number of all os accounts created count:
"
+
countFir
);
countFir
=
countFir
-
2
;
countFir
=
countFir
-
1
;
expect
(
countFir
).
assertEqual
(
obtainCount
);
expect
(
countFir
).
assertEqual
(
obtainCount
);
await
osAccountManager
.
removeOsAccount
(
localIdFir
);
await
osAccountManager
.
removeOsAccount
(
localIdFir
);
console
.
debug
(
"
====>remove localId:
"
+
localIdFir
);
console
.
debug
(
"
====>remove localId:
"
+
localIdFir
);
var
countSec
=
await
osAccountManager
.
getOsAccountCount
();
//
var countSec = await osAccountManager.getOsAccountCount();
console
.
debug
(
"
====>obtains the number accounts created count:
"
+
countSec
);
//
console.debug("====>obtains the number accounts created count:" + countSec);
countSec
=
countSec
-
1
;
//
countSec = countSec - 1;
expect
(
countSec
).
assertEqual
(
obtainCount
);
//
expect(countSec).assertEqual(obtainCount);
await
osAccountManager
.
removeOsAccount
(
localIdSec
);
//
await osAccountManager.removeOsAccount(localIdSec);
console
.
debug
(
"
====>remove localId:
"
+
localIdSec
);
//
console.debug("====>remove localId: " + localIdSec);
console
.
debug
(
"
====>ActsOsAccountQueryCounts_0200 end====
"
);
console
.
debug
(
"
====>ActsOsAccountQueryCounts_0200 end====
"
);
done
();
done
();
})
})
/*
/*
* @tc.number : ActsOsAccountGetActivedOsAccountIds_0100
* @tc.number : ActsOsAccountGetActivedOsAccountIds_0100
* @tc.name : getActivatedOsAccountIds callback
* @tc.name : getActivatedOsAccountIds callback
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录