Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ea6e72ee
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
接近 2 年 前同步成功
通知
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看板
未验证
提交
ea6e72ee
编写于
8月 23, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 23, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5117 【账号】XTS冻结适配,NoPermission_0700
Merge pull request !5117 from 何海涛/0823_0616_unavailiable
上级
a9885f4a
dbc0c2c4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
22 addition
and
5 deletion
+22
-5
account/appaccount/actsaccounttest/src/main/js/test/NoPermission.test.js
...unt/actsaccounttest/src/main/js/test/NoPermission.test.js
+2
-1
account/appaccount/actsaccounttest/src/main/js/test/OnOff.js
account/appaccount/actsaccounttest/src/main/js/test/OnOff.js
+14
-4
account/appaccount/actsgetallaccounts/src/main/js/test/Getallaccounts.test.js
...ctsgetallaccounts/src/main/js/test/Getallaccounts.test.js
+2
-0
account/appaccount/sceneProject/actsaccountsceneonoff/entry/src/main/js/default/pages/index/index.js
...sceneonoff/entry/src/main/js/default/pages/index/index.js
+2
-0
account/appaccount/sceneProject/actsscenegetallaccounts/entry/src/main/js/default/pages/index/index.js
...llaccounts/entry/src/main/js/default/pages/index/index.js
+2
-0
未找到文件。
account/appaccount/actsaccounttest/src/main/js/test/NoPermission.test.js
浏览文件 @
ea6e72ee
...
...
@@ -198,7 +198,8 @@ export default function ActsAccountNoPermission() {
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccounts
(
selfBundle
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccounts 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
account
.
ResultCode
.
ERROR_PERMISSION_DENIED
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
>
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
getAll_callback_nopermission
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
...
...
account/appaccount/actsaccounttest/src/main/js/test/OnOff.js
浏览文件 @
ea6e72ee
...
...
@@ -30,7 +30,11 @@ export default function ActsAccountChangeOnOff() {
console
.
info
(
`sleep #{time} over ...`
)
})
}
beforeAll
(
async
function
(
done
)
{
beforeAll
(
async
function
(
done
)
{
done
();
});
async
function
testInit
(){
console
.
debug
(
"
====>startAbility start====
"
);
await
featureAbility
.
startAbility
(
{
...
...
@@ -46,8 +50,7 @@ export default function ActsAccountChangeOnOff() {
},
);
await
sleep
(
TIMEOUT
);
done
();
});
}
/*
* @tc.number : ActsAccountChangeOnOff_0100
...
...
@@ -56,6 +59,7 @@ export default function ActsAccountChangeOnOff() {
* the additional information
*/
it
(
'
ActsAccountChangeOnOff_0100
'
,
0
,
async
function
(
done
)
{
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0100 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -124,6 +128,7 @@ export default function ActsAccountChangeOnOff() {
* the associatal data
*/
it
(
'
ActsAccountChangeOnOff_0200
'
,
0
,
async
function
(
done
)
{
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0200 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -187,6 +192,7 @@ export default function ActsAccountChangeOnOff() {
* the credential
*/
it
(
'
ActsAccountChangeOnOff_0300
'
,
0
,
async
function
(
done
)
{
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0300 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -250,6 +256,7 @@ export default function ActsAccountChangeOnOff() {
* authorized account
*/
it
(
'
ActsAccountChangeOnOff_0400
'
,
0
,
async
function
(
done
)
{
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0400 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -317,6 +324,7 @@ export default function ActsAccountChangeOnOff() {
* the only authorized account
*/
it
(
'
ActsAccountChangeOnOff_0500
'
,
0
,
async
function
(
done
)
{
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0500 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -325,7 +333,7 @@ export default function ActsAccountChangeOnOff() {
console
.
debug
(
"
====>enableAppAccess ActsAccountChangeOnOff_0500 start
"
);
await
appAccountManager
.
enableAppAccess
(
"
onoff_delete
"
,
"
com.example.actsaccountsceneonoff
"
);
function
unSubscriberCallback
(
err
){
console
.
debug
(
"
====>unsubscribe 0500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>unsubscribe 0500 err:
"
+
JSON
.
stringify
(
err
));
}
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0500 data:
"
+
JSON
.
stringify
(
data
));
...
...
@@ -375,6 +383,7 @@ export default function ActsAccountChangeOnOff() {
* authorized account
*/
it
(
'
ActsAccountChangeOnOff_0600
'
,
0
,
async
function
(
done
)
{
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0600 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -446,6 +455,7 @@ export default function ActsAccountChangeOnOff() {
* the only authorized account
*/
it
(
'
ActsAccountChangeOnOff_0700
'
,
0
,
async
function
(
done
)
{
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0700 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
account/appaccount/actsgetallaccounts/src/main/js/test/Getallaccounts.test.js
100755 → 100644
浏览文件 @
ea6e72ee
...
...
@@ -459,6 +459,8 @@ export default function ActsGetAllAccounts() {
var
nonexistentBundle
=
"
com.example.actsgetallaccountsnonexistent
"
;
try
{
var
data
=
await
appAccountManager
.
getAllAccounts
(
nonexistentBundle
);
expect
().
assertFail
();
done
();
}
catch
(
err
){
console
.
debug
(
"
====>getAllAccounts 1400 err:
"
+
JSON
.
stringify
(
err
));
...
...
account/appaccount/sceneProject/actsaccountsceneonoff/entry/src/main/js/default/pages/index/index.js
浏览文件 @
ea6e72ee
...
...
@@ -14,6 +14,7 @@
*/
import
account
from
'
@ohos.account.appAccount
'
import
commonevent
from
'
@ohos.commonEvent
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
const
ACCOUNT_TEST_ONOFF_EXTRA
=
1
const
ACCOUNT_TEST_ONOFF_ASSOCIATEDDATA
=
2
...
...
@@ -46,6 +47,7 @@ export default {
appAccountManager
.
off
(
'
change
'
,
function
(){
console
.
debug
(
"
====>scene off finish====
"
);
});
featureAbility
.
terminateSelf
()
}
// Subscribe to the callback of account information changes, verify the received account information, and send
...
...
account/appaccount/sceneProject/actsscenegetallaccounts/entry/src/main/js/default/pages/index/index.js
浏览文件 @
ea6e72ee
...
...
@@ -13,6 +13,7 @@
* limitations under the License.
*/
import
account
from
'
@ohos.account.appAccount
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
...
...
@@ -33,6 +34,7 @@ export default {
console
.
debug
(
"
====>add account scene err:
"
+
JSON
.
stringify
(
err
));
appAccountManager
.
enableAppAccess
(
"
account_name_scene_single
"
,
enableBundle
,
(
err
)
=>
{
console
.
debug
(
"
====>enableAppAccess scene err:
"
+
JSON
.
stringify
(
err
));
featureAbility
.
terminateSelf
()
});
});
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录