Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
df5e0a4d
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看板
提交
df5e0a4d
编写于
3月 30, 2023
作者:
Z
zhaimengchao
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【account】【master】用例执行时序问题
Signed-off-by:
N
zhaimengchao
<
zhaimengchao@huawei.com
>
上级
cf3830df
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
21 addition
and
58 deletion
+21
-58
account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js
...accountoperatetest/src/main/js/test/Authenticator.test.js
+1
-1
account/appaccount/actsaccounttest/src/main/js/test/Authenticator.test.js
...nt/actsaccounttest/src/main/js/test/Authenticator.test.js
+1
-1
account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js
...countsbyowner/src/main/js/test/Getaccountsbyowner.test.js
+19
-56
未找到文件。
account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js
浏览文件 @
df5e0a4d
...
@@ -47,7 +47,7 @@ export default function ActsAccountAppAccess() {
...
@@ -47,7 +47,7 @@ export default function ActsAccountAppAccess() {
console
.
debug
(
"
====>afterEach start====
"
);
console
.
debug
(
"
====>afterEach start====
"
);
var
appAccountManager
=
account
.
getAccountManager
();
var
appAccountManager
=
account
.
getAccountManager
();
var
accounts
=
await
appAccountManager
.
getAllAccountByOwner
(
owner
)
var
accounts
=
await
appAccountManager
.
getAllAccountByOwner
(
owner
)
for
(
i
=
0
;
i
<
accounts
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
accounts
.
length
;
i
++
){
var
localName
=
accounts
[
i
].
name
var
localName
=
accounts
[
i
].
name
if
(
localName
==
'
zhangsan
'
){
if
(
localName
==
'
zhangsan
'
){
await
appAccountManager
.
removeAccount
(
localName
)
await
appAccountManager
.
removeAccount
(
localName
)
...
...
account/appaccount/actsaccounttest/src/main/js/test/Authenticator.test.js
浏览文件 @
df5e0a4d
...
@@ -46,7 +46,7 @@ export default function ActsAccountAuthenticator() {
...
@@ -46,7 +46,7 @@ export default function ActsAccountAuthenticator() {
console
.
debug
(
"
====>afterEach start====
"
);
console
.
debug
(
"
====>afterEach start====
"
);
var
appAccountManager
=
account
.
getAccountManager
();
var
appAccountManager
=
account
.
getAccountManager
();
var
accounts
=
await
appAccountManager
.
getAllAccountByOwner
(
owner
)
var
accounts
=
await
appAccountManager
.
getAllAccountByOwner
(
owner
)
for
(
i
=
0
;
i
<
accounts
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
accounts
.
length
;
i
++
){
var
localName
=
accounts
[
i
].
name
var
localName
=
accounts
[
i
].
name
if
(
localName
==
'
zhangsan
'
){
if
(
localName
==
'
zhangsan
'
){
await
appAccountManager
.
removeAccount
(
localName
)
await
appAccountManager
.
removeAccount
(
localName
)
...
...
account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js
浏览文件 @
df5e0a4d
...
@@ -21,6 +21,25 @@ const LENGTHLIMIT = 1024;
...
@@ -21,6 +21,25 @@ const LENGTHLIMIT = 1024;
const
SELFBUNDLE
=
'
com.example.actsgetaccountsbyowner
'
const
SELFBUNDLE
=
'
com.example.actsgetaccountsbyowner
'
const
createAccountOptions
=
{
customData
:{
age
:
'
12
'
}}
const
createAccountOptions
=
{
customData
:{
age
:
'
12
'
}}
export
default
function
GetAccountsByOwner
()
{
export
default
function
GetAccountsByOwner
()
{
beforeAll
(
async
function
(
done
)
{
console
.
debug
(
"
====>startAbility first start====
"
);
await
featureAbility
.
startAbility
(
{
want
:
{
deviceId
:
""
,
bundleName
:
"
com.example.actsscenegetallaccounts
"
,
abilityName
:
"
com.example.actsscenegetallaccounts.MainAbility
"
,
action
:
"
action1
"
,
parameters
:
{},
},
},
);
sleep
(
TIMEOUT
);
done
();
});
describe
(
'
GetAccountsByOwner
'
,
function
()
{
describe
(
'
GetAccountsByOwner
'
,
function
()
{
async
function
sleep
(
delay
)
{
async
function
sleep
(
delay
)
{
let
timeoutId
=
null
;
let
timeoutId
=
null
;
...
@@ -266,20 +285,6 @@ export default function GetAccountsByOwner() {
...
@@ -266,20 +285,6 @@ export default function GetAccountsByOwner() {
console
.
debug
(
"
====>creat finish====
"
);
console
.
debug
(
"
====>creat finish====
"
);
console
.
debug
(
"
====>add account 0900 start====
"
);
console
.
debug
(
"
====>add account 0900 start====
"
);
await
appAccountManager
.
createAccount
(
"
Account_application_callback
"
);
await
appAccountManager
.
createAccount
(
"
Account_application_callback
"
);
console
.
debug
(
"
====>startAbility 0900 start====
"
);
await
featureAbility
.
startAbility
(
{
want
:
{
deviceId
:
""
,
bundleName
:
"
com.example.actsscenegetallaccounts
"
,
abilityName
:
"
com.example.actsscenegetallaccounts.MainAbility
"
,
action
:
"
action1
"
,
parameters
:
{},
},
},
);
function
getAllCallback
(
err
,
data
){
function
getAllCallback
(
err
,
data
){
console
.
debug
(
"
====>getAccountsByOwner 0900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountsByOwner 0900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountsByOwner 0900 data:
"
+
JSON
.
stringify
(
data
));
console
.
debug
(
"
====>getAccountsByOwner 0900 data:
"
+
JSON
.
stringify
(
data
));
...
@@ -310,20 +315,6 @@ export default function GetAccountsByOwner() {
...
@@ -310,20 +315,6 @@ export default function GetAccountsByOwner() {
console
.
debug
(
"
====>creat finish====
"
);
console
.
debug
(
"
====>creat finish====
"
);
console
.
debug
(
"
====>add account 1000 start====
"
);
console
.
debug
(
"
====>add account 1000 start====
"
);
await
appAccountManager
.
createAccount
(
"
Account_application_promise
"
);
await
appAccountManager
.
createAccount
(
"
Account_application_promise
"
);
console
.
debug
(
"
====>startAbility 1000 start====
"
);
await
featureAbility
.
startAbility
(
{
want
:
{
deviceId
:
""
,
bundleName
:
"
com.example.actsscenegetallaccounts
"
,
abilityName
:
"
com.example.actsscenegetallaccounts.MainAbility
"
,
action
:
"
action1
"
,
parameters
:
{},
},
},
);
sleep
(
TIMEOUT
)
sleep
(
TIMEOUT
)
console
.
debug
(
"
====>getAccountsByOwner 1000 start====
"
);
console
.
debug
(
"
====>getAccountsByOwner 1000 start====
"
);
try
{
try
{
...
@@ -361,20 +352,6 @@ export default function GetAccountsByOwner() {
...
@@ -361,20 +352,6 @@ export default function GetAccountsByOwner() {
var
appAccountManager
=
account
.
createAppAccountManager
();
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat finish====
"
);
console
.
debug
(
"
====>creat finish====
"
);
var
specifiedBundle
=
"
com.example.actsscenegetallaccounts
"
;
var
specifiedBundle
=
"
com.example.actsscenegetallaccounts
"
;
console
.
debug
(
"
====>startAbility 1100 start====
"
);
await
featureAbility
.
startAbility
(
{
want
:
{
deviceId
:
""
,
bundleName
:
"
com.example.actsscenegetallaccounts
"
,
abilityName
:
"
com.example.actsscenegetallaccounts.MainAbility
"
,
action
:
"
action1
"
,
parameters
:
{},
},
},
);
function
getAllCallback
(
err
,
data
){
function
getAllCallback
(
err
,
data
){
console
.
debug
(
"
====>getAccountsByOwner 1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountsByOwner 1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountsByOwner 1100 data:
"
+
JSON
.
stringify
(
data
));
console
.
debug
(
"
====>getAccountsByOwner 1100 data:
"
+
JSON
.
stringify
(
data
));
...
@@ -400,20 +377,6 @@ export default function GetAccountsByOwner() {
...
@@ -400,20 +377,6 @@ export default function GetAccountsByOwner() {
var
appAccountManager
=
account
.
createAppAccountManager
();
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat finish====
"
);
console
.
debug
(
"
====>creat finish====
"
);
var
specifiedBundle
=
"
com.example.actsscenegetallaccounts
"
;
var
specifiedBundle
=
"
com.example.actsscenegetallaccounts
"
;
console
.
debug
(
"
====>startAbility 1200 start====
"
);
await
featureAbility
.
startAbility
(
{
want
:
{
deviceId
:
""
,
bundleName
:
"
com.example.actsscenegetallaccounts
"
,
abilityName
:
"
com.example.actsscenegetallaccounts.MainAbility
"
,
action
:
"
action1
"
,
parameters
:
{},
},
},
);
await
sleep
(
TIMEOUT
)
await
sleep
(
TIMEOUT
)
console
.
debug
(
"
====>getAccountsByOwner 1200 start====
"
);
console
.
debug
(
"
====>getAccountsByOwner 1200 start====
"
);
try
{
try
{
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
5326b64d
·
4月 02, 2023
mentioned in commit
5326b64d
mentioned in commit 5326b64dce370480297dba11c851c19419819605
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录