Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
fd828ca7
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看板
提交
fd828ca7
编写于
2月 10, 2022
作者:
H
huangke11
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add cust js api test
Signed-off-by:
N
huangke11
<
huangke11@huawei.com
>
上级
9994c8b2
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
29 addition
and
29 deletion
+29
-29
global/cust/custjs/BUILD.gn
global/cust/custjs/BUILD.gn
+3
-3
global/cust/custjs/Test.json
global/cust/custjs/Test.json
+1
-1
global/cust/custjs/src/main/js/default/app.js
global/cust/custjs/src/main/js/default/app.js
+0
-1
global/cust/custjs/src/main/js/default/pages/index/index.hml
global/cust/custjs/src/main/js/default/pages/index/index.hml
+1
-1
global/cust/custjs/src/main/js/default/test/Cust.test.js
global/cust/custjs/src/main/js/default/test/Cust.test.js
+22
-22
global/cust/custjs/src/main/js/default/test/List.test.js
global/cust/custjs/src/main/js/default/test/List.test.js
+2
-1
未找到文件。
global/cust/custjs/BUILD.gn
浏览文件 @
fd828ca7
...
@@ -20,12 +20,12 @@ ohos_js_hap_suite("custjs_test") {
...
@@ -20,12 +20,12 @@ ohos_js_hap_suite("custjs_test") {
":custjs_resources",
":custjs_resources",
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "
CustJsApi
Test"
hap_name = "
ActsCustJs
Test"
}
}
ohos_js_assets("
resmgr
js_assets") {
ohos_js_assets("
cust
js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
}
}
ohos_resources("
resmgr
js_resources") {
ohos_resources("
cust
js_resources") {
sources = [ "./src/main/resources" ]
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
hap_profile = "./src/main/config.json"
}
}
global/cust/custjs/Test.json
浏览文件 @
fd828ca7
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
"kits"
:
[
"kits"
:
[
{
{
"test-file-name"
:
[
"test-file-name"
:
[
"
CustJSApi
Test.hap"
"
ActsCustJs
Test.hap"
],
],
"type"
:
"AppInstallKit"
,
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
"cleanup-apps"
:
true
...
...
global/cust/custjs/src/main/js/default/app.js
浏览文件 @
fd828ca7
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
import
device
from
'
@system.device
'
;
export
default
{
export
default
{
onCreate
()
{
onCreate
()
{
...
...
global/cust/custjs/src/main/js/default/pages/index/index.hml
浏览文件 @
fd828ca7
<div class="container">
<div class="container">
<text class="title">
<text class="title">
{{ $t('strings.hello') }} {{
title
}}
{{ $t('strings.hello') }} {{
title
}}
</text>
</text>
</div>
</div>
global/cust/custjs/src/main/js/default/test/Cust.test.js
浏览文件 @
fd828ca7
...
@@ -126,7 +126,7 @@ describe('CustTest', function () {
...
@@ -126,7 +126,7 @@ describe('CustTest', function () {
it
(
'
getCfgDirList_test_005
'
,
0
,
async
function
(
done
)
{
it
(
'
getCfgDirList_test_005
'
,
0
,
async
function
(
done
)
{
cust
.
getCfgDirList
((
error
,
value
)
=>
{
cust
.
getCfgDirList
((
error
,
value
)
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
getCfgDirList_test_005:
'
+
value
);
console
.
log
(
'
CustTest
getCfgDirList_test_005:
'
+
value
);
});
});
done
();
done
();
})
})
...
@@ -139,7 +139,7 @@ describe('CustTest', function () {
...
@@ -139,7 +139,7 @@ describe('CustTest', function () {
it
(
'
getCfgDirList_test_006
'
,
0
,
async
function
(
done
)
{
it
(
'
getCfgDirList_test_006
'
,
0
,
async
function
(
done
)
{
cust
.
getCfgDirList
().
then
(
value
=>
{
cust
.
getCfgDirList
().
then
(
value
=>
{
expect
(
value
.
length
!=
0
).
assertTrue
();
expect
(
value
.
length
!=
0
).
assertTrue
();
console
.
log
(
'
getCfgDirList_test_006:
'
+
value
);
console
.
log
(
'
CustTest
getCfgDirList_test_006:
'
+
value
);
});
});
done
();
done
();
})
})
...
...
global/cust/custjs/src/main/js/default/test/List.test.js
浏览文件 @
fd828ca7
...
@@ -12,4 +12,5 @@
...
@@ -12,4 +12,5 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
require
(
'
./Resmgr.test.js
'
)
require
(
'
./Cust.test.js
'
)
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录