Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
04e446c9
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看板
未验证
提交
04e446c9
编写于
2月 26, 2022
作者:
O
openharmony_ci
提交者:
Gitee
2月 26, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2079 modify testcases on 20220225
Merge pull request !2079 from 杨清/1228
上级
c35005ad
6cadd1b6
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
88 addition
and
47 deletion
+88
-47
global/cust/custjs/src/main/js/default/i18n/en-US.json
global/cust/custjs/src/main/js/default/i18n/en-US.json
+2
-2
global/cust/custjs/src/main/js/default/i18n/zh-CN.json
global/cust/custjs/src/main/js/default/i18n/zh-CN.json
+2
-2
global/cust/custjs/src/main/js/default/test/Cust.test.js
global/cust/custjs/src/main/js/default/test/Cust.test.js
+17
-17
global/i18n_standard/intljs/src/main/js/default/i18n/en-US.json
.../i18n_standard/intljs/src/main/js/default/i18n/en-US.json
+2
-2
global/i18n_standard/intljs/src/main/js/default/i18n/zh-CN.json
.../i18n_standard/intljs/src/main/js/default/i18n/zh-CN.json
+2
-2
global/i18n_standard/intljs/src/main/js/default/test/Lang.test.js
...18n_standard/intljs/src/main/js/default/test/Lang.test.js
+36
-18
global/resmgr_standard/resmgrjs/src/main/js/default/i18n/en-US.json
...mgr_standard/resmgrjs/src/main/js/default/i18n/en-US.json
+2
-2
global/resmgr_standard/resmgrjs/src/main/js/default/i18n/zh-CN.json
...mgr_standard/resmgrjs/src/main/js/default/i18n/zh-CN.json
+2
-2
global/resmgr_standard/resmgrjs/src/main/js/default/test/Resmgr.test.js
...standard/resmgrjs/src/main/js/default/test/Resmgr.test.js
+15
-0
global/resmgr_standard/resmgrjs/src/main/resources/rawfile/rawfiletest.xml
...ndard/resmgrjs/src/main/resources/rawfile/rawfiletest.xml
+8
-0
未找到文件。
global/cust/custjs/src/main/js/default/i18n/en-US.json
浏览文件 @
04e446c9
{
"strings"
:
{
"hello"
:
"
Hello
"
,
"world"
:
"
World
"
"hello"
:
"
Global
"
,
"world"
:
"
System
"
}
}
\ No newline at end of file
global/cust/custjs/src/main/js/default/i18n/zh-CN.json
浏览文件 @
04e446c9
{
"strings"
:
{
"hello"
:
"
您好
"
,
"world"
:
"
世界
"
"hello"
:
"
全球化
"
,
"world"
:
"
子系统
"
}
}
\ No newline at end of file
global/cust/custjs/src/main/js/default/test/Cust.test.js
浏览文件 @
04e446c9
...
...
@@ -49,7 +49,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETFILES_JS_001
* @tc.name test getCfgFiles method in callback mode
* @tc.name test getCfgFiles method in callback mode
with not exist param
* @tc.desc get getCfgFiles in callback mode
*/
it
(
'
getCfgFiles_test_001
'
,
0
,
async
function
(
done
)
{
...
...
@@ -63,7 +63,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETFILES_JS_002
* @tc.name test getCfgFiles method in callback mode
* @tc.name test getCfgFiles method in callback mode
with low priority param
* @tc.desc get getCfgFiles in callback mode
*/
it
(
'
getCfgFiles_test_002
'
,
0
,
async
function
(
done
)
{
...
...
@@ -77,7 +77,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETFILES_JS_003
* @tc.name test getCfgFiles method in callback mode
* @tc.name test getCfgFiles method in callback mode
both exist param
* @tc.desc get getCfgFiles in callback mode
*/
it
(
'
getCfgFiles_test_003
'
,
0
,
async
function
(
done
)
{
...
...
@@ -91,7 +91,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETFILES_JS_004
* @tc.name test getCfgFiles method in callback mode
* @tc.name test getCfgFiles method in callback mode
with high priority param
* @tc.desc get getCfgFiles in callback mode
*/
it
(
'
getCfgFiles_test_004
'
,
0
,
async
function
(
done
)
{
...
...
@@ -105,7 +105,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETFILES_JS_005
* @tc.name test getCfgFiles method in promise mode
* @tc.name test getCfgFiles method in promise mode
with not exist param
* @tc.desc get getCfgFiles in promise mode
*/
it
(
'
getCfgFiles_test_005
'
,
0
,
async
function
(
done
)
{
...
...
@@ -119,7 +119,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETFILES_JS_006
* @tc.name test getCfgFiles method in promise mode
* @tc.name test getCfgFiles method in promise mode
with low priority param
* @tc.desc get getCfgFiles in promise mode
*/
it
(
'
getCfgFiles_test_006
'
,
0
,
async
function
(
done
)
{
...
...
@@ -133,7 +133,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETFILES_JS_007
* @tc.name test getCfgFiles method in promise mode
* @tc.name test getCfgFiles method in promise mode
with both exist param
* @tc.desc get getCfgFiles in promise mode
*/
it
(
'
getCfgFiles_test_007
'
,
0
,
async
function
(
done
)
{
...
...
@@ -147,7 +147,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETFILES_JS_008
* @tc.name test getCfgFiles method in promise mode
* @tc.name test getCfgFiles method in promise mode
with high priority param
* @tc.desc get getCfgFiles in promise mode
*/
it
(
'
getCfgFiles_test_008
'
,
0
,
async
function
(
done
)
{
...
...
@@ -161,7 +161,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETONEFILE_JS_001
* @tc.name test getOneCfgFile method in callback mode
* @tc.name test getOneCfgFile method in callback mode
with not exist param
* @tc.desc get getOneCfgFile in callback mode
*/
it
(
'
getOneCfgFile_test_001
'
,
0
,
async
function
(
done
)
{
...
...
@@ -175,7 +175,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETONEFILE_JS_002
* @tc.name test getOneCfgFile method in callback mode
* @tc.name test getOneCfgFile method in callback mode
with low priority param
* @tc.desc get getOneCfgFile in callback mode
*/
it
(
'
getOneCfgFile_test_002
'
,
0
,
async
function
(
done
)
{
...
...
@@ -189,7 +189,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETONEFILE_JS_003
* @tc.name test getOneCfgFile method in callback mode
* @tc.name test getOneCfgFile method in callback mode
with both exist param
* @tc.desc get getOneCfgFile in callback mode
*/
it
(
'
getOneCfgFile_test_003
'
,
0
,
async
function
(
done
)
{
...
...
@@ -203,7 +203,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETONEFILE_JS_004
* @tc.name test getOneCfgFile method in callback mode
* @tc.name test getOneCfgFile method in callback mode
with high priority param
* @tc.desc get getOneCfgFile in callback mode
*/
it
(
'
getOneCfgFile_test_004
'
,
0
,
async
function
(
done
)
{
...
...
@@ -217,7 +217,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETONEFILE_JS_005
* @tc.name test getOneCfgFile method in promise mode
* @tc.name test getOneCfgFile method in promise mode
with not exist param
* @tc.desc get getOneCfgFile in promise mode
*/
it
(
'
getOneCfgFile_test_005
'
,
0
,
async
function
(
done
)
{
...
...
@@ -231,7 +231,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETONEFILE_JS_006
* @tc.name test getOneCfgFile method in promise mode
* @tc.name test getOneCfgFile method in promise mode
with low priority param
* @tc.desc get getOneCfgFile in promise mode
*/
it
(
'
getOneCfgFile_test_006
'
,
0
,
async
function
(
done
)
{
...
...
@@ -246,8 +246,8 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETONEFILE_JS_007
* @tc.name test getOneCfgFile method in promise mode
* @tc.desc get getOneCfgFile in promise mode
* @tc.name test getOneCfgFile method in promise mode
with both exist param
* @tc.desc get getOneCfgFile in promise mode
and return the high priority file
*/
it
(
'
getOneCfgFile_test_007
'
,
0
,
async
function
(
done
)
{
...
...
@@ -261,7 +261,7 @@ describe('CustTest', function () {
/* *
* @tc.number SUB_GLOBAL_CUST_GETONEFILE_JS_008
* @tc.name test getOneCfgFile method in promise mode
* @tc.name test getOneCfgFile method in promise mode
with high priority param
* @tc.desc get getOneCfgFile in promise mode
*/
it
(
'
getOneCfgFile_test_008
'
,
0
,
async
function
(
done
)
{
...
...
global/i18n_standard/intljs/src/main/js/default/i18n/en-US.json
浏览文件 @
04e446c9
{
"strings"
:
{
"hello"
:
"
Hello
"
,
"world"
:
"
World
"
"hello"
:
"
Global
"
,
"world"
:
"
System
"
},
"Files"
:
{
}
...
...
global/i18n_standard/intljs/src/main/js/default/i18n/zh-CN.json
浏览文件 @
04e446c9
{
"strings"
:
{
"hello"
:
"
您好
"
,
"world"
:
"
世界
"
"hello"
:
"
全球化
"
,
"world"
:
"
子系统
"
},
"Files"
:
{
}
...
...
global/i18n_standard/intljs/src/main/js/default/test/Lang.test.js
浏览文件 @
04e446c9
...
...
@@ -22,11 +22,17 @@ describe('LangTest', function () {
let
initPreferredLang
=
I18n
.
getPreferredLanguageList
();
let
initLen
=
initPreferredLang
.
length
;
/* *
* get the current preferred language list
*/
function
getCurrentPreferredLang
(){
let
value
=
I18n
.
getPreferredLanguageList
();
return
value
;
}
/* *
* judge if the lang is in the preferred language list or not
*/
function
isContainLang
(
langList
,
lang
){
let
len
=
langList
.
length
;
for
(
let
i
=
0
;
i
<
len
;
i
++
){
...
...
@@ -37,6 +43,9 @@ describe('LangTest', function () {
return
false
}
/* *
* clear the preferred language list if exists
*/
function
clearLang
(
langList
){
let
len
=
langList
.
length
;
while
(
len
>
0
){
...
...
@@ -50,6 +59,9 @@ describe('LangTest', function () {
console
.
log
(
'
i18n_test_preferredlanguage_clearLang
'
+
I18n
.
getPreferredLanguageList
());
}
/* *
* execute this step after every testcase
*/
function
restoreLang
(){
for
(
let
j
=
0
;
j
<
initLen
;
j
++
){
let
value
=
I18n
.
addPreferredLanguage
(
initPreferredLang
[
j
],
j
);
...
...
@@ -65,10 +77,16 @@ describe('LangTest', function () {
console
.
log
(
'
i18n_test_preferredlanguage_restoreLang
'
+
I18n
.
getPreferredLanguageList
());
}
/* *
* execute this step before every testcase
*/
beforeEach
(
function
(){
console
.
log
(
'
i18n_test_preferredlanguage_beforeEach
'
+
getCurrentPreferredLang
());
})
/* *
* execute this step after every testcase
*/
afterEach
(
function
(){
let
currLang
=
getCurrentPreferredLang
();
console
.
log
(
'
i18n_test_preferredlanguage_afterEach
'
+
currLang
);
...
...
@@ -91,7 +109,7 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CLOCK_0200
* @tc.name test the set24HourClock interface with
fals
e param
* @tc.name test the set24HourClock interface with
tru
e param
* @tc.desc check the value of set24HourClock method
*/
it
(
'
i18n_test_clock_0200
'
,
0
,
function
()
{
...
...
@@ -106,7 +124,7 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CLOCK_0300
* @tc.name test the set24HourClock interface with
tru
e param
* @tc.name test the set24HourClock interface with
fals
e param
* @tc.desc check the value of set24HourClock method
*/
it
(
'
i18n_test_clock_0300
'
,
0
,
function
()
{
...
...
@@ -138,7 +156,7 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0100
* @tc.name test the getPreferredLanguageList interface
* @tc.name test the getPreferredLanguageList interface
with default value
* @tc.desc check the value of getPreferredLanguageList method
*/
it
(
'
i18n_test_preferredlanguage_0100
'
,
0
,
function
()
{
...
...
@@ -225,7 +243,7 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0400
* @tc.name test the addPreferredLanguage interface
* @tc.name test the addPreferredLanguage interface
with en and index 1 param
* @tc.desc check the value of addPreferredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_0400
'
,
0
,
function
()
{
...
...
@@ -240,7 +258,7 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0500
* @tc.name test the addPreferredLanguage interface
* @tc.name test the addPreferredLanguage interface
with ja and index -1 param
* @tc.desc check the value of addPreferredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_0500
'
,
0
,
function
()
{
...
...
@@ -255,7 +273,7 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0600
* @tc.name test the addPreferredLanguage interface
* @tc.name test the addPreferredLanguage interface
with ko and index 100 param
* @tc.desc check the value of addPreferredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_0600
'
,
0
,
function
()
{
...
...
@@ -270,8 +288,8 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0700
* @tc.name test the
addPreferredLanguage interface
* @tc.desc check the value of
add
PreferredLanguage method
* @tc.name test the
removePreferredLanguage interface with 0 param
* @tc.desc check the value of
remove
PreferredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_0700
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_preferredlanguage_0700
'
+
'
start
'
);
...
...
@@ -300,8 +318,8 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0800
* @tc.name test the
addPreferredLanguage interface
* @tc.desc check the value of
add
PreferredLanguage method
* @tc.name test the
removePreferredLanguage interface with -1 param
* @tc.desc check the value of
remove
PreferredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_0800
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_preferredlanguage_0800
'
+
'
start
'
);
...
...
@@ -315,7 +333,7 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0820
* @tc.name test the removePreferredLanguage interface with -1 param
* @tc.name test the removePreferredLanguage interface with -1 param
after add ja
* @tc.desc check the value of removePreferredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_0820
'
,
0
,
function
()
{
...
...
@@ -333,8 +351,8 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0900
* @tc.name test the
addPreferredLanguage interface
* @tc.desc check the value of
add
PreferredLanguage method
* @tc.name test the
removePreferredLanguage interface with 0 param
* @tc.desc check the value of
remove
PreferredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_0900
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_preferredlanguage_0900
'
+
'
start
'
);
...
...
@@ -352,7 +370,7 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0920
* @tc.name test the addPreferredLanguage interface
* @tc.name test the addPreferredLanguage interface
with it param
* @tc.desc check the value of addPreferredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_0920
'
,
0
,
function
()
{
...
...
@@ -375,8 +393,8 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_0940
* @tc.name test the
addPreferredLanguage interfac
e
* @tc.desc check the value of
addP
referredLanguage method
* @tc.name test the
mixed interface with preferredlanguag
e
* @tc.desc check the value of
p
referredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_0940
'
,
0
,
function
()
{
let
value
=
I18n
.
addPreferredLanguage
(
'
it
'
);
...
...
@@ -421,8 +439,8 @@ describe('LangTest', function () {
/* *
* @tc.number SUB_GLOBAL_I18N_JS_PREFERREDLANGUAGE_1000
* @tc.name test the
add
PreferredLanguage interface
* @tc.desc check the value of
add
PreferredLanguage method
* @tc.name test the
getFirst
PreferredLanguage interface
* @tc.desc check the value of
getFirst
PreferredLanguage method
*/
it
(
'
i18n_test_preferredlanguage_1000
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_preferredlanguage_1000
'
+
'
start
'
);
...
...
global/resmgr_standard/resmgrjs/src/main/js/default/i18n/en-US.json
浏览文件 @
04e446c9
{
"strings"
:
{
"hello"
:
"
Hello
"
,
"world"
:
"
World
"
"hello"
:
"
Global
"
,
"world"
:
"
System
"
}
}
\ No newline at end of file
global/resmgr_standard/resmgrjs/src/main/js/default/i18n/zh-CN.json
浏览文件 @
04e446c9
{
"strings"
:
{
"hello"
:
"
您好
"
,
"world"
:
"
世界
"
"hello"
:
"
全球化
"
,
"world"
:
"
子系统
"
}
}
\ No newline at end of file
global/resmgr_standard/resmgrjs/src/main/js/default/test/Resmgr.test.js
浏览文件 @
04e446c9
...
...
@@ -326,5 +326,20 @@ describe('resMgrTest', function () {
done
();
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_1900
* @tc.name test release method
* @tc.desc get the release function
*/
it
(
'
release_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getString
(
0x1000000
,
(
err
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
})
mgr
.
release
();
})
done
();
})
console
.
log
(
'
*************end ResmgrTest*************
'
);
})
\ No newline at end of file
global/resmgr_standard/resmgrjs/src/main/resources/rawfile/rawfiletest.xml
0 → 100755
浏览文件 @
04e446c9
<?xml version="1.0" encoding="UTF-8"?>
<mirror>
<id>
maven-default-http-blocker
</id>
<mirrorOf>
external:http:*
</mirrorOf>
<name>
Pseudo repository to mirror external repositories initially using HTTP.
</name>
<url>
http://0.0.0.0/
</url>
<blocked>
true
</blocked>
</mirror>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录