Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8b012c29
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看板
提交
8b012c29
编写于
3月 29, 2023
作者:
C
cclicn
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【应用账号】xts用例整改,取消账号名空格字符限制
Signed-off-by:
N
cclicn
<
lichenchen22@huawei.com
>
上级
6feebf67
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
35 addition
and
38 deletion
+35
-38
account/appaccount/actsaccountoperatetest/src/main/js/test/CreateAccount.test.js
...accountoperatetest/src/main/js/test/CreateAccount.test.js
+14
-10
account/appaccount/actsaccountoperatetest/src/main/js/test/CustomData.test.js
...ctsaccountoperatetest/src/main/js/test/CustomData.test.js
+21
-28
未找到文件。
account/appaccount/actsaccountoperatetest/src/main/js/test/CreateAccount.test.js
浏览文件 @
8b012c29
...
...
@@ -339,13 +339,18 @@ export default function ActsAccountCreateAccount() {
console
.
debug
(
"
====>ActsAccountCreateAccount_1500 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
var
specialStr
=
"
"
;
try
{
try
{
appAccountManager
.
createAccount
(
specialStr
,
createAccountOptions
,
(
err
)
=>
{
expect
(
err
.
code
==
12300002
).
assertEqual
(
true
);
console
.
error
(
"
====>createAccount ActsAccountCreateAccount_1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCreateAccount_1500 end====
"
);
appAccountManager
.
removeAccount
(
"
"
,
(
err
)
=>
{
console
.
error
(
"
====>removeAccount ActsAccountCreateAccount_1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
done
();
});
}
catch
(
err
){
});
}
catch
(
err
)
{
expect
().
assertFail
();
done
();
}
...
...
@@ -360,14 +365,13 @@ export default function ActsAccountCreateAccount() {
console
.
debug
(
"
====>ActsAccountCreateAccount_1600 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
var
specialStr
=
"
"
;
try
{
try
{
await
appAccountManager
.
createAccount
(
specialStr
,
createAccountOptions
);
expect
().
assertFail
();
await
appAccountManager
.
removeAccount
(
specialStr
);
done
();
}
catch
(
err
){
console
.
debug
(
"
====>add Account ActsAccountCreateAccount_1600 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
==
12300002
).
assertEqual
(
true
);
}
catch
(
err
)
{
console
.
debug
(
"
====>createAccount ActsAccountCreateAccount_1600 err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
console
.
debug
(
"
====>ActsAccountCreateAccount_1600 end====
"
);
done
();
}
...
...
account/appaccount/actsaccountoperatetest/src/main/js/test/CustomData.test.js
浏览文件 @
8b012c29
...
...
@@ -1087,22 +1087,25 @@ export default function ActsAccountCustomData() {
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
createAccount
(
"
"
,
(
err
)
=>
{
console
.
debug
(
"
====>
add a
ccount ActsAccountCustomData_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
console
.
debug
(
"
====>
createA
ccount ActsAccountCustomData_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setCustomData
(
"
"
,
"
key29
"
,
"
value29
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setCustomData ActsAccountCustomData_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getCustomData
(
"
"
,
"
key29
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getCustomData 2900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getCustomData 2900 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCustomData_2900 end====
"
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
value29
"
);
appAccountManager
.
removeAccount
(
"
"
,
(
err
)
=>
{
console
.
error
(
"
====>removeAccount ActsAccountCustomData_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
done
();
});
});
});
});
});
/*
* @tc.number : ActsAccountCustomData_3000
...
...
@@ -1113,28 +1116,18 @@ export default function ActsAccountCustomData() {
console
.
debug
(
"
====>ActsAccountCustomData_3000 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat finish====
"
);
try
{
try
{
await
appAccountManager
.
createAccount
(
"
"
);
}
catch
(
err
){
console
.
debug
(
"
====>add account ActsAccountCustomData_3000 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
try
{
await
appAccountManager
.
setCustomData
(
"
"
,
"
key30
"
,
"
value30
"
);
}
catch
(
err
){
console
.
error
(
"
====>setCustomData ActsAccountCustomData_3000 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
try
{
await
appAccountManager
.
getCustomData
(
"
"
,
"
key30
"
);
}
catch
(
err
){
console
.
error
(
"
====>getCustomData ActsAccountCustomData_3000 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
console
.
debug
(
"
====>ActsAccountCustomData_3000 end====
"
);
var
data
=
await
appAccountManager
.
getCustomData
(
"
"
,
"
key30
"
);
console
.
error
(
"
====>getCustomData ActsAccountCustomData_3000 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertEqual
(
"
value30
"
);
await
appAccountManager
.
removeAccount
(
"
"
);
done
();
}
catch
(
err
)
{
console
.
error
(
"
====>ActsAccountCustomData_3000 fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
}
}
})
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
e9f589d0
·
4月 20, 2023
mentioned in commit
e9f589d0
mentioned in commit e9f589d0ea2d8869d61e8801fe1696039108a0b7
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录