Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
541aa057
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看板
提交
541aa057
编写于
3月 03, 2023
作者:
G
gwx1146427
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【account】【master】修改JSAPI的UN测试用例
Signed-off-by:
N
gwx1146427
<
guoyongqiang8@huawei.com
>
上级
9b18c5bc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
19 deletion
+30
-19
account/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js
...nt/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js
+25
-14
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
+1
-1
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/sceneProject/actsaccountauthenticator/entry/src/main/js/MainAbility/pages/index/index.js
...icator/entry/src/main/js/MainAbility/pages/index/index.js
+2
-2
未找到文件。
account/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js
浏览文件 @
541aa057
...
...
@@ -122,25 +122,31 @@ export default function ActsDAGetSetTest() {
scalableData
:{}
};
accountAbility
.
setOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
accountAbility
.
getOsAccountDistributedInfo
(
function
(
data
)
{
accountAbility
.
getOsAccountDistributedInfo
(
function
(
err
,
data
)
{
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 ccerr:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
1234
5
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC
5
'
)
let
obj
=
{
id
:
'
12345
'
,
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOUT
'
};
accountAbility
.
setOsAccountDistributedInfo
(
obj
).
then
(
function
(
err
)
{
expect
(
err
).
assertEqual
(
null
)
});
accountAbility
.
setOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
accountAbility
.
getOsAccountDistributedInfo
(
function
(
err
,
data
)
{
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 get ccerr:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 get ccdata:
'
+
JSON
.
stringify
(
data
))
expect
(
err
).
assertEqual
(
null
)
done
();
})
}).
catch
((
err
)
=>
{
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 ccerr:
'
+
JSON
.
stringify
(
err
))
expect
().
assertFail
();
done
();
})
});
});
accountAbility
.
getOsAccountDistributedInfo
(
function
(
data
)
{
console
.
debug
(
'
====>setOsAccountDistributedInfo_test001 get data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
).
assertEqual
(
null
)
done
();
})
})
/**
...
...
@@ -156,9 +162,11 @@ export default function ActsDAGetSetTest() {
event
:
'
Ohos.account.event.LOGIN
'
,
scalableData
:{}
};
accountAbility
.
setOsAccountDistributedInfo
(
obj
,
function
()
{
accountAbility
.
setOsAccountDistributedInfo
(
obj
,
function
(
err
)
{
console
.
debug
(
'
====>setOsAccountDistributedInfo_test002 ccerr callback:
'
+
JSON
.
stringify
(
err
))
accountAbility
.
getOsAccountDistributedInfo
(
function
(
err
,
data
)
{
console
.
debug
(
"
====>setOsAccountDistributedInfo_test002 data:
"
+
JSON
.
stringify
(
data
))
console
.
debug
(
'
====>setOsAccountDistributedInfo_test002 get ccerr:
'
+
JSON
.
stringify
(
err
))
console
.
debug
(
"
====>setOsAccountDistributedInfo_test002 get data:
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5
'
)
let
obj
=
{
...
...
@@ -166,8 +174,11 @@ export default function ActsDAGetSetTest() {
name
:
'
ZhangSan
'
,
event
:
'
Ohos.account.event.LOGOUT
'
};
accountAbility
.
setOsAccountDistributedInfo
(
obj
).
then
(
function
(
data
)
{
expect
(
data
).
assertEqual
(
null
)
accountAbility
.
setOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
done
();
}).
catch
((
err
)
=>
{
console
.
debug
(
'
====>setOsAccountDistributedInfo_test002 set ccerr:
'
+
JSON
.
stringify
(
err
))
expect
().
assertFail
();
done
();
});
});
...
...
account/OsAccountTest_js/src/main/js/test/OsAccount.test.js
100755 → 100644
浏览文件 @
541aa057
...
...
@@ -124,7 +124,7 @@ export default function AccountTest() {
scalableData
:
data
};
accountAbility
.
updateOsAccountDistributedInfo
(
obj
).
then
(
function
()
{
accountAbility
.
queryOsAccountDistributedInfo
(
function
(
data
)
{
accountAbility
.
queryOsAccountDistributedInfo
(
function
(
err
,
data
)
{
console
.
debug
(
'
====>account_updateOsAccountDistributedInfo_test001 data:
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
name
).
assertEqual
(
'
ZhangSan
'
)
expect
(
data
.
id
).
assertEqual
(
'
12345
'
)
...
...
account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js
浏览文件 @
541aa057
...
...
@@ -14,7 +14,7 @@
*/
import
account
from
'
@ohos.account.appAccount
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
const
NAMELIMIT
=
512
;
const
LENGTHLIMIT
=
1024
;
...
...
account/appaccount/actsaccounttest/src/main/js/test/Authenticator.test.js
浏览文件 @
541aa057
...
...
@@ -14,7 +14,7 @@
*/
import
account
from
'
@ohos.account.appAccount
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
const
NAMELIMIT
=
512
;
const
LENGTHLIMIT
=
1024
;
...
...
account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/MainAbility/pages/index/index.js
浏览文件 @
541aa057
...
...
@@ -19,10 +19,10 @@ export default {
data
:
{
title
:
"
Hello World
"
},
on
Init
()
{
on
Show
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
on
Show
()
{
on
Init
()
{
console
.
info
(
'
====>ServiceAbility onStart
'
);
var
accountMgr
=
account_appAccount
.
createAppAccountManager
();
accountMgr
.
createAccount
(
"
zhangsan
"
,
async
(
data
)
=>
{
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
f5bf79e5
·
3月 08, 2023
mentioned in commit
f5bf79e5
mentioned in commit f5bf79e5d986436363113db42fb08f84b8eefc59
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录