Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
27258a30
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
27258a30
编写于
2月 12, 2022
作者:
H
huangke11
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add cust js api test
Signed-off-by:
N
huangke11
<
huangke11@huawei.com
>
上级
d0d76c99
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
22 deletion
+22
-22
global/cust/custjs/Test.json
global/cust/custjs/Test.json
+6
-6
global/cust/custjs/src/main/js/default/test/GetCfgFiles.test.js
.../cust/custjs/src/main/js/default/test/GetCfgFiles.test.js
+8
-8
global/cust/custjs/src/main/js/default/test/GetOneCfgFile.test.js
...ust/custjs/src/main/js/default/test/GetOneCfgFile.test.js
+8
-8
未找到文件。
global/cust/custjs/Test.json
浏览文件 @
27258a30
...
...
@@ -17,12 +17,12 @@
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"mkdir -p /system/etc/custxml/"
,
"mkdir -p /sys-prod/etc/custxml/"
,
"touch /system/etc/custxml/system.xml"
,
"touch /system/etc/custxml/both.xml"
,
"touch /sys-prod/etc/custxml/both.xml"
,
"touch /sys-prod/etc/custxml/user.xml"
"mkdir -p /system/etc/custxml
test
/"
,
"mkdir -p /sys-prod/etc/custxml
test
/"
,
"touch /system/etc/custxml
test
/system.xml"
,
"touch /system/etc/custxml
test
/both.xml"
,
"touch /sys-prod/etc/custxml
test
/both.xml"
,
"touch /sys-prod/etc/custxml
test
/user.xml"
]
}
]
...
...
global/cust/custjs/src/main/js/default/test/GetCfgFiles.test.js
浏览文件 @
27258a30
...
...
@@ -25,19 +25,19 @@ describe('GetCfgFilesTest', function () {
* @tc.desc get getCfgFiles in callback mode
*/
it
(
'
getCfgFiles_test_003
'
,
0
,
async
function
(
done
)
{
cust
.
getCfgFiles
(
'
custxml/none.xml
'
,
(
error
,
value
)
=>
{
cust
.
getCfgFiles
(
'
custxml
test
/none.xml
'
,
(
error
,
value
)
=>
{
expect
(
value
.
length
==
0
).
assertTrue
();
console
.
log
(
'
CustTest getCfgFiles_test_003, none.xml:
'
+
value
);
});
cust
.
getCfgFiles
(
'
custxml/system.xml
'
,
(
error
,
value
)
=>
{
cust
.
getCfgFiles
(
'
custxml
test
/system.xml
'
,
(
error
,
value
)
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getCfgFiles_test_003, system.xml:
'
+
value
);
});
cust
.
getCfgFiles
(
'
custxml/both.xml
'
,
(
error
,
value
)
=>
{
cust
.
getCfgFiles
(
'
custxml
test
/both.xml
'
,
(
error
,
value
)
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getCfgFiles_test_003, both.xml:
'
+
value
);
});
cust
.
getCfgFiles
(
'
custxml/user.xml
'
,
(
error
,
value
)
=>
{
cust
.
getCfgFiles
(
'
custxml
test
/user.xml
'
,
(
error
,
value
)
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getCfgFiles_test_003, user.xml:
'
+
value
);
});
...
...
@@ -50,19 +50,19 @@ describe('GetCfgFilesTest', function () {
* @tc.desc get getCfgFiles in promise mode
*/
it
(
'
getCfgFiles_test_004
'
,
0
,
async
function
(
done
)
{
cust
.
getCfgFiles
(
'
custxml/none.xml
'
).
then
(
value
=>
{
cust
.
getCfgFiles
(
'
custxml
test
/none.xml
'
).
then
(
value
=>
{
expect
(
value
.
length
==
0
).
assertTrue
();
console
.
log
(
'
CustTest getCfgFiles_test_004, none.xml:
'
+
value
);
});
cust
.
getCfgFiles
(
'
custxml/system.xml
'
).
then
(
value
=>
{
cust
.
getCfgFiles
(
'
custxml
test
/system.xml
'
).
then
(
value
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getCfgFiles_test_004, system.xml:
'
+
value
);
});
cust
.
getCfgFiles
(
'
custxml/both.xml
'
).
then
(
value
=>
{
cust
.
getCfgFiles
(
'
custxml
test
/both.xml
'
).
then
(
value
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getCfgFiles_test_004, both.xml:
'
+
value
);
});
cust
.
getCfgFiles
(
'
custxml/user.xml
'
).
then
(
value
=>
{
cust
.
getCfgFiles
(
'
custxml
test
/user.xml
'
).
then
(
value
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getCfgFiles_test_004, user.xml:
'
+
value
);
});
...
...
global/cust/custjs/src/main/js/default/test/GetOneCfgFile.test.js
浏览文件 @
27258a30
...
...
@@ -25,19 +25,19 @@ describe('GetOneCfgFileTest', function () {
* @tc.desc get getOneCfgFile in callback mode
*/
it
(
'
getOneCfgFile_test_001
'
,
0
,
async
function
(
done
)
{
cust
.
getOneCfgFile
(
'
custxml/none.xml
'
,
(
error
,
value
)
=>
{
cust
.
getOneCfgFile
(
'
custxml
test
/none.xml
'
,
(
error
,
value
)
=>
{
expect
(
value
.
length
==
0
).
assertTrue
();
console
.
log
(
'
CustTest getOneCfgFile_test_001, none.xml:
'
+
value
);
});
cust
.
getOneCfgFile
(
'
custxml/system.xml
'
,
(
error
,
value
)
=>
{
cust
.
getOneCfgFile
(
'
custxml
test
/system.xml
'
,
(
error
,
value
)
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getOneCfgFile_test_001, system.xml:
'
+
value
);
});
cust
.
getOneCfgFile
(
'
custxml/both.xml
'
,
(
error
,
value
)
=>
{
cust
.
getOneCfgFile
(
'
custxml
test
/both.xml
'
,
(
error
,
value
)
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getOneCfgFile_test_001, both.xml:
'
+
value
);
});
cust
.
getOneCfgFile
(
'
custxml/user.xml
'
,
(
error
,
value
)
=>
{
cust
.
getOneCfgFile
(
'
custxml
test
/user.xml
'
,
(
error
,
value
)
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getOneCfgFile_test_001, user.xml:
'
+
value
);
});
...
...
@@ -50,19 +50,19 @@ describe('GetOneCfgFileTest', function () {
* @tc.desc get getOneCfgFile in promise mode
*/
it
(
'
getOneCfgFile_test_002
'
,
0
,
async
function
(
done
)
{
cust
.
getOneCfgFile
(
'
custxml/none.xml
'
).
then
(
value
=>
{
cust
.
getOneCfgFile
(
'
custxml
test
/none.xml
'
).
then
(
value
=>
{
expect
(
value
.
length
==
0
).
assertTrue
();
console
.
log
(
'
CustTest getOneCfgFile_test_002, none.xml:
'
+
value
);
});
cust
.
getOneCfgFile
(
'
custxml/system.xml
'
).
then
(
value
=>
{
cust
.
getOneCfgFile
(
'
custxml
test
/system.xml
'
).
then
(
value
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getOneCfgFile_test_002, system.xml:
'
+
value
);
});
cust
.
getOneCfgFile
(
'
custxml/both.xml
'
).
then
(
value
=>
{
cust
.
getOneCfgFile
(
'
custxml
test
/both.xml
'
).
then
(
value
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getOneCfgFile_test_002, both.xml:
'
+
value
);
});
cust
.
getOneCfgFile
(
'
custxml/user.xml
'
).
then
(
value
=>
{
cust
.
getOneCfgFile
(
'
custxml
test
/user.xml
'
).
then
(
value
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
CustTest getOneCfgFile_test_002, user.xml:
'
+
value
);
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录