Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c7004497
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看板
提交
c7004497
编写于
11月 22, 2022
作者:
L
lichenchen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【挑单】账号错误码更新,xts用例预期结果同步修改
Signed-off-by:
N
lichenchen
<
lichenchen15@huawei.com
>
上级
37337840
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
24 addition
and
16 deletion
+24
-16
account/appaccount/actsaccountoperatetest/src/main/js/test/AccountCredential.test.js
...untoperatetest/src/main/js/test/AccountCredential.test.js
+3
-2
account/appaccount/actsaccountoperatetest/src/main/js/test/AuthToken.test.js
...actsaccountoperatetest/src/main/js/test/AuthToken.test.js
+2
-2
account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js
...accountoperatetest/src/main/js/test/Authenticator.test.js
+11
-3
account/appaccount/actsaccountoperatetest/src/main/js/test/CreateAccount.test.js
...accountoperatetest/src/main/js/test/CreateAccount.test.js
+3
-3
account/appaccount/actsaccounttest/src/main/config.json
account/appaccount/actsaccounttest/src/main/config.json
+2
-3
account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/MainAbility/pages/index/index.js
...icator/entry/src/main/js/MainAbility/pages/index/index.js
+3
-3
未找到文件。
account/appaccount/actsaccountoperatetest/src/main/js/test/AccountCredential.test.js
浏览文件 @
c7004497
...
...
@@ -17,6 +17,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
const
TIMEOUT
=
5000
;
const
EACHTIMEOUT
=
500
;
const
ERR_JS_CREDENTIAL_NOT_EXIST
=
12300102
;
export
default
function
ActsAppAccountCredential
()
{
describe
(
'
ActsAppAccountCredential
'
,
function
()
{
function
sleep
(
delay
)
{
...
...
@@ -458,7 +459,7 @@ export default function ActsAppAccountCredential() {
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getCredential
(
"
account_name_1500
"
,
"
credentialType15
"
,
(
err
)
=>
{
console
.
debug
(
"
====>getCredential ActsAppAccountCredential_1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
==
12300019
).
assertEqual
(
true
);
expect
(
err
.
code
==
ERR_JS_CREDENTIAL_NOT_EXIST
).
assertEqual
(
true
);
appAccountManager
.
removeAccount
(
"
account_name_1500
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAppAccountCredential_1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
...
...
@@ -485,7 +486,7 @@ export default function ActsAppAccountCredential() {
}
catch
(
err
){
console
.
debug
(
"
====>getCredential ActsAppAccountCredential_1600 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
==
12300019
).
assertEqual
(
true
);
expect
(
err
.
code
==
ERR_JS_CREDENTIAL_NOT_EXIST
).
assertEqual
(
true
);
console
.
debug
(
"
====>delete account ActsAppAccountCredential_1600 start====
"
);
await
appAccountManager
.
removeAccount
(
"
account_name_1600
"
);
console
.
debug
(
"
====>ActsAppAccountCredential_1600 end====
"
);
...
...
account/appaccount/actsaccountoperatetest/src/main/js/test/AuthToken.test.js
浏览文件 @
c7004497
...
...
@@ -25,7 +25,7 @@ const LENGTHLIMIT = 512;
const
TOKENLENGTHLIMIT
=
1024
;
const
AUTHTYPELENGTHLIMIT
=
1024
;
const
OWNERLENGTHLIMIT
=
1024
;
const
ERR_JS_AUTH_TYPE_NOT_FOUND
=
12300107
;
const
OWNERSELF
=
"
com.example.actsaccountoperatetest
"
;
export
default
function
ActsAccountAuthToken
()
{
describe
(
'
ActsAccountAuthToken
'
,
function
()
{
...
...
@@ -1335,7 +1335,7 @@ export default function ActsAccountAuthToken() {
await
appAccountManager
.
deleteAuthToken
(
"
account_promise_repeatDelete
"
,
OWNERSELF
,
"
aythType
"
,
"
promise_repeatDelete_token
"
);
}
catch
(
err
){
console
.
debug
(
"
====>deleteAuthToken second ActsAccountAuthToken_2200 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
==
12400004
).
assertEqual
(
true
);
expect
(
err
.
code
==
ERR_JS_AUTH_TYPE_NOT_FOUND
).
assertEqual
(
true
);
}
try
{
console
.
debug
(
"
====>getAuthToken ActsAccountAuthToken_2200 start====
"
);
...
...
account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js
浏览文件 @
c7004497
...
...
@@ -33,8 +33,9 @@ export default function ActsAccountAppAccess() {
console
.
info
(
`sleep #{time} over ...`
)
})
}
beforeAll
(
async
function
(
done
)
{
await
featureAbility
.
startAbility
(
beforeAll
(
async
function
(
done
)
{
console
.
debug
(
"
====>ActsAccountAuthenticator beforeAll start====
"
);
await
featureAbility
.
startAbilityForResult
(
{
want
:
{
...
...
@@ -47,7 +48,8 @@ export default function ActsAccountAppAccess() {
},
},
)
await
sleep
(
1500
)
await
sleep
(
1500
);
console
.
debug
(
"
====>ActsAccountAuthenticator beforeAll end====
"
);
done
();
});
beforeEach
(
async
(
done
)
=>
{
...
...
@@ -619,7 +621,9 @@ export default function ActsAccountAppAccess() {
expect
(
data
.
length
).
assertEqual
(
1
)
}
catch
(
err
)
{
console
.
debug
(
"
====>ActsAccountSelectAccountByOptions_0100 err:
"
+
JSON
.
stringify
(
err
));
await
appAccountManager
.
removeAccount
(
name
);
expect
(
err
).
assertEqual
(
null
)
done
();
}
try
{
await
appAccountManager
.
removeAccount
(
name
)
...
...
@@ -654,7 +658,9 @@ export default function ActsAccountAppAccess() {
expect
(
data
.
length
).
assertEqual
(
3
)
}
catch
(
err
)
{
console
.
debug
(
"
====>ActsAccountSelectAccountByOptions_0200 err:
"
+
JSON
.
stringify
(
err
));
await
appAccountManager
.
removeAccount
(
name
);
expect
(
err
).
assertEqual
(
null
)
done
();
}
try
{
await
appAccountManager
.
removeAccount
(
name
)
...
...
@@ -690,7 +696,9 @@ export default function ActsAccountAppAccess() {
expect
(
data
.
length
).
assertEqual
(
1
)
}
catch
(
err
)
{
console
.
debug
(
"
====>ActsAccountSelectAccountByOptions_0300 err:
"
+
JSON
.
stringify
(
err
));
await
appAccountManager
.
removeAccount
(
name
);
expect
(
err
).
assertEqual
(
null
)
done
();
}
try
{
await
appAccountManager
.
removeAccount
(
name
)
...
...
account/appaccount/actsaccountoperatetest/src/main/js/test/CreateAccount.test.js
浏览文件 @
c7004497
...
...
@@ -19,7 +19,7 @@ const NAMELIMIT = 512;
const
LENGTHLIMIT
=
1024
;
const
ERR_PARAMETER_CHECK_FAILD
=
401
const
ERR_INVALID_PARAMETER
=
12300002
const
ERR_ACCOUNT_EXIST
=
1230000
8
const
ERR_ACCOUNT_EXIST
=
1230000
4
const
createAccountOptions
=
{
customData
:{
age
:
'
12
'
}}
//k and v length 1024 ,k and v size 1024
const
createAccountOptionsDiff
=
{
customData
:{
sex
:
'
male
'
}}
export
default
function
ActsAccountCreateAccount
()
{
...
...
@@ -521,7 +521,7 @@ export default function ActsAccountCreateAccount() {
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
createAccount
(
"
account_name_callback_same
"
,
createAccountOptionsDiff
,
(
err
)
=>
{
console
.
debug
(
"
====>add account second time ActsAccountCreateAccount_2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
12300008
);
expect
(
err
.
code
).
assertEqual
(
ERR_ACCOUNT_EXIST
);
appAccountManager
.
removeAccount
(
"
account_name_callback_same
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountCreateAccount_2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
...
...
@@ -548,7 +548,7 @@ export default function ActsAccountCreateAccount() {
}
catch
(
err
){
console
.
debug
(
"
====>add account for the second time err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
12300008
);
expect
(
err
.
code
).
assertEqual
(
ERR_ACCOUNT_EXIST
);
appAccountManager
.
removeAccount
(
"
account_name_promise_same
"
);
console
.
debug
(
"
====>ActsAccountCreateAccount_2400 end====
"
);
done
();
...
...
account/appaccount/actsaccounttest/src/main/config.json
浏览文件 @
c7004497
...
...
@@ -17,9 +17,8 @@
"package"
:
"com.example.actsaccounttest"
,
"name"
:
".MyApplication"
,
"deviceType"
:
[
"tablet"
,
"default"
,
"phone"
"tablet"
,
"default"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
...
...
account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/MainAbility/pages/index/index.js
浏览文件 @
c7004497
...
...
@@ -31,15 +31,15 @@ export default {
await
accountMgr
.
setAppAccess
(
"
zhangsan
"
,
"
com.example.actsaccounttest
"
,
true
);
console
.
info
(
'
====>ServiceAbility setAppAccess actsaccountoperatetest zhangsan
'
);
await
accountMgr
.
setAppAccess
(
"
zhangsan
"
,
"
com.example.actsaccountoperatetest
"
,
true
);
console
.
info
(
'
====>ServiceAbility
lcc
addAccount 02 onStart
'
);
console
.
info
(
'
====>ServiceAbility addAccount 02 onStart
'
);
accountMgr
.
createAccount
(
"
lisi
"
,
async
(
err
)
=>
{
console
.
info
(
'
====>ServiceAbility setAppAccess actsaccounttest lisi
'
);
await
accountMgr
.
setAppAccess
(
"
lisi
"
,
"
com.example.actsaccounttest
"
,
true
);
console
.
info
(
'
====>ServiceAbility setAppAccess actsaccountoperatetest lisi
'
);
await
accountMgr
.
setAppAccess
(
"
lisi
"
,
"
com.example.actsaccountoperatetest
"
,
true
);
console
.
info
(
'
====>ServiceAbility
lcc
addAccount 03 onStart
'
);
console
.
info
(
'
====>ServiceAbility addAccount 03 onStart
'
);
accountMgr
.
createAccount
(
"
wangwu
"
,
async
(
err
)
=>
{
console
.
info
(
'
====>ServiceAbility
lcc
enableAppAccess 03 onStart
'
);
console
.
info
(
'
====>ServiceAbility enableAppAccess 03 onStart
'
);
console
.
info
(
'
====>ServiceAbility setAppAccess actsaccounttest wangwu
'
);
await
accountMgr
.
setAppAccess
(
"
wangwu
"
,
"
com.example.actsaccounttest
"
,
true
)
console
.
info
(
'
====>ServiceAbility setAppAccess actsaccountoperatetest wangwu
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录