Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
906edaf6
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看板
未验证
提交
906edaf6
编写于
5月 29, 2023
作者:
O
openharmony_ci
提交者:
Gitee
5月 29, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8812 modify global stage cases to 4.0beta1
Merge pull request !8812 from 杨清/cherry-pick-1685361499
上级
8bc53e22
fb6c28fa
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
426 addition
and
281 deletion
+426
-281
global/global_stage/entry/src/main/ets/test/globalstage.test.ets
...global_stage/entry/src/main/ets/test/globalstage.test.ets
+348
-25
global/global_stage/entry/src/main/resources/base/element/boolean.json
..._stage/entry/src/main/resources/base/element/boolean.json
+20
-0
global/global_stage/entry/src/main/resources/base/element/integer.json
..._stage/entry/src/main/resources/base/element/integer.json
+12
-0
global/global_stage/entry/src/main/resources/base/element/plural.json
...l_stage/entry/src/main/resources/base/element/plural.json
+17
-0
global/global_stage/entry/src/main/resources/base/element/strarray.json
...stage/entry/src/main/resources/base/element/strarray.json
+29
-0
global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js
.../resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js
+0
-256
未找到文件。
global/global_stage/entry/src/main/ets/test/globalstage.test.ets
浏览文件 @
906edaf6
...
@@ -18,6 +18,8 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
...
@@ -18,6 +18,8 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
export default function globalStageTest() {
export default function globalStageTest() {
describe("globalStageTest", function () {
describe("globalStageTest", function () {
console.log('*************end globalStageTest*************');
beforeAll(async function () {
beforeAll(async function () {
console.info("beforeAll case");
console.info("beforeAll case");
});
});
...
@@ -32,95 +34,416 @@ export default function globalStageTest() {
...
@@ -32,95 +34,416 @@ export default function globalStageTest() {
});
});
/**
/**
* @tc.number : SUB_GLOBAL_GETSTRINGSYNC_
04
00
* @tc.number : SUB_GLOBAL_GETSTRINGSYNC_
STAGE_01
00
* @tc.name : getStringSync with resource object and format value
* @tc.name : getStringSync with resource object and format value
* @tc.desc : getStringSync
* @tc.desc : getStringSync
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it('getStringSync_
test_04
00', 0, async function (done) {
it('getStringSync_
stagetest_01
00', 0, async function (done) {
let mgr = globalThis.yq.resourceManager;
let mgr = globalThis.yq.resourceManager;
try{
try{
let value = mgr.getStringSync(
let value = mgr.getStringSync(
{ bundleName:"ohos.acts.globalstage",
{ bundleName:"ohos.acts.globalstage",
moduleName:"phone",
moduleName:"phone",
id:0x01000000}, 100);
id:0x01000000}, 100);
console.log('getStringSync_
test_04
00 1' + value);
console.log('getStringSync_
stagetest_01
00 1' + value);
expect(value
!= null).assertTrue(
);
expect(value
).assertEqual('ohosProject 100'
);
}catch(error){
}catch(error){
console.log('getStringSync_
test_04
00 3' + error.code);
console.log('getStringSync_
stagetest_01
00 3' + error.code);
expect(error.code == 401).assertTrue();
expect(error.code == 401).assertTrue();
console.log('getStringSync_
test_04
00 3' + error.message);
console.log('getStringSync_
stagetest_01
00 3' + error.message);
}
}
done();
done();
})
})
/**
/**
* @tc.number : SUB_GLOBAL_GETSTRINGSYNC_
041
0
* @tc.number : SUB_GLOBAL_GETSTRINGSYNC_
STAGE_020
0
* @tc.name : getStringSync with resource object
* @tc.name : getStringSync with resource object
* @tc.desc : getStringSync
* @tc.desc : getStringSync
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it('getStringSync_
test_041
0', 0, async function (done) {
it('getStringSync_
stagetest_020
0', 0, async function (done) {
let mgr = globalThis.yq.resourceManager;
let mgr = globalThis.yq.resourceManager;
try{
try{
let value = mgr.getStringSync(
let value = mgr.getStringSync(
{ bundleName:"ohos.acts.globalstage",
{ bundleName:"ohos.acts.globalstage",
moduleName:"phone",
moduleName:"phone",
id:0x01000000});
id:0x01000000});
console.log('getStringSync_
test_041
0 1' + value);
console.log('getStringSync_
stagetest_020
0 1' + value);
expect(value
!= null).assertTrue(
);
expect(value
).assertEqual('ohosProject %d'
);
}catch(error){
}catch(error){
console.log('getStringSync_
test_041
0 2' + error.code);
console.log('getStringSync_
stagetest_020
0 2' + error.code);
expect(error.code == 401).assertTrue();
expect(error.code == 401).assertTrue();
console.log('getStringSync_
test_041
0 3' + error.message);
console.log('getStringSync_
stagetest_020
0 3' + error.message);
}
}
done();
done();
})
})
/**
/**
* @tc.number : SUB_GLOBAL_GETSTRING
SYNC_0411
* @tc.number : SUB_GLOBAL_GETSTRING
BYNAME_STAGE_0100
* @tc.name : getStringByNameSync with resource name
* @tc.name : getStringByNameSync with resource name
* @tc.desc : getStringByNameSync
* @tc.desc : getStringByNameSync
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it('getString
Sync_test_0411
', 0, async function (done) {
it('getString
ByNameSync_stagetest_0100
', 0, async function (done) {
try{
try{
let value = globalThis.yq.resourceManager.getStringByNameSync('app_name');
let value = globalThis.yq.resourceManager.getStringByNameSync('app_name');
console.log('getString
Sync_test_0411
1' + value);
console.log('getString
ByNameSync_stagetest_0100
1' + value);
expect(value
!= null).assertTrue(
);
expect(value
).assertEqual('ohosProject %d'
);
}
}
catch(e){
catch(e){
console.log('getString
Sync_test_0411
2' + e.code);
console.log('getString
ByNameSync_stagetest_0100
2' + e.code);
console.log('getString
Sync_test_0411
3' + e.code);
console.log('getString
ByNameSync_stagetest_0100
3' + e.code);
}
}
done();
done();
})
})
/**
/**
* @tc.number : SUB_GLOBAL_GETSTRING
SYNC_0411
* @tc.number : SUB_GLOBAL_GETSTRING
BYNAME_STAGE_0200
* @tc.name : getStringByNameSync with resource name and format value
* @tc.name : getStringByNameSync with resource name and format value
* @tc.desc : getStringByNameSync
* @tc.desc : getStringByNameSync
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it('getString
Sync_test_0412
', 0, async function (done) {
it('getString
ByNameSync_stagetest_0200
', 0, async function (done) {
try{
try{
let value = globalThis.yq.resourceManager.getStringByNameSync('app_name',100);
let value = globalThis.yq.resourceManager.getStringByNameSync('app_name',100);
console.log('getString
Sync_test_0412
1' + value);
console.log('getString
ByNameSync_stagetest_0200
1' + value);
expect(value
!= null).assertTrue(
);
expect(value
).assertEqual('ohosProject 100'
);
}
}
catch(e){
catch(e){
console.log('getString
Sync_test_0412
2' + e.code);
console.log('getString
ByNameSync_stagetest_0200
2' + e.code);
console.log('getString
Sync_test_0412
3' + e.code);
console.log('getString
ByNameSync_stagetest_0200
3' + e.code);
}
}
done();
done();
})
})
});
/**
* @tc.number : SUB_GLOBAL_GETSTRINGVALUE_STAGE_0100
* @tc.name : getStringValue with resource name in callback mode
* @tc.desc : getStringValue
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getStringValue_stage_test_0100', 0, async function (done) {
globalThis.yq.resourceManager.getStringValue({ bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000000}, (err, value) => {
expect(value !== null).assertTrue();
console.log('getStringValue_stage_test_0100 ' + value);
expect(value).assertEqual('ohosProject %d');
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETSTRINGVALUE_STAGE_0200
* @tc.name : getStringValue with resource name in promise mode
* @tc.desc : getStringValue
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getStringValue_stage_test_0200', 0, async function (done) {
globalThis.yq.resourceManager.getStringValue({ bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000000}).then(value => {
expect(value !== null).assertTrue();
console.log('getStringValue_stage_test_0200 ' + value);
expect(value).assertEqual('ohosProject %d');
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETSTRINGARRAYVALUE_STAGE_0100
* @tc.name : getStringArrayValue with resource name in callback mode
* @tc.desc : getStringArrayValue
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getStringArrayValue_stage_test_0100', 0, async function (done) {
globalThis.yq.resourceManager.getStringArrayValue({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x0100000A}, (err, value) => {
expect(value !== null).assertTrue();
console.log('getStringArrayValue_stage_test_0100 ' + value);
expect(value[0]).assertEqual('small');
expect(value[1]).assertEqual('middle');
expect(value[2]).assertEqual('large');
expect(value[3]).assertEqual('extra large');
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETSTRINGARRAYVALUE_STAGE_0200
* @tc.name : getStringArrayValue with resource name in promise mode
* @tc.desc : getStringArrayValue
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getStringArrayValue_stage_test_0200', 0, async function (done) {
globalThis.yq.resourceManager.getStringArrayValue({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x0100000A}).then(value => {
expect(value !== null).assertTrue();
console.log('getStringArrayValue_stage_test_0200 ' + value);
expect(value[0]).assertEqual('small');
expect(value[1]).assertEqual('middle');
expect(value[2]).assertEqual('large');
expect(value[3]).assertEqual('extra large');
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETMEDIACONTENT_STAGE_0100
* @tc.name : getMediaContent with resource name in callback mode
* @tc.desc : getMediaContent
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getMediaContent_stage_test_0100', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContent({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, (err, value) => {
expect(value.length == 6790).assertTrue();
console.log('getMediaContent_stage_test_0100 ' + value.length);
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETMEDIACONTENT_STAGE_0200
* @tc.name : getMediaContent with resource name in promise mode
* @tc.desc : getMediaContent
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getMediaContent_stage_test_0200', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContent({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}).then(value => {
expect(value.length == 6790).assertTrue();
console.log('getMediaContent_stage_test_0200 ' + value.length);
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETMEDIACONTENT_STAGE_0300
* @tc.name : getMediaContent with resource name and density in callback mode
* @tc.desc : getMediaContent
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getMediaContent_stage_test_0300', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContent({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, 0 , (err, value) => {
expect(value.length == 6790).assertTrue();
console.log('getMediaContent_stage_test_0300 ' + value.length);
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETMEDIACONTENT_STAGE_0400
* @tc.name : getMediaContent with resource name and density in promise mode
* @tc.desc : getMediaContent
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getMediaContent_stage_test_0400', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContent({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, 0).then(value => {
expect(value.length == 6790).assertTrue();
console.log('getMediaContent_stage_test_0400 ' + value.length);
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETMEDIACONTENTBASE64_STAGE_0100
* @tc.name : getMediaContentBase64 with resource name in callback mode
* @tc.desc : getMediaContentBase64
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getMediaContentBase64_stage_test_0100', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContentBase64({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, (err, value) => {
expect(value.length == 9078).assertTrue();
console.log('getMediaContentBase64_stage_test_0100 ' + value.length);
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETMEDIACONTENTBASE64_STAGE_0200
* @tc.name : getMediaContentBase64 with resource name in promise mode
* @tc.desc : getMediaContentBase64
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getMediaContentBase64_stage_test_0200', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContentBase64({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}).then(value => {
expect(value.length == 9078).assertTrue();
console.log('getMediaContentBase64_stage_test_0200 ' + value.length);
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETMEDIACONTENTBASE64_STAGE_0300
* @tc.name : getMediaContentBase64 with resource name and density in callback mode
* @tc.desc : getMediaContentBase64
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getMediaContentBase64_stage_test_0300', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContentBase64({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, 0 , (err, value) => {
expect(value.length == 9078).assertTrue();
console.log('getMediaContentBase64_stage_test_0300 ' + value.length);
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETMEDIACONTENTBASE64_STAGE_0400
* @tc.name : getMediaContentBase64 with resource name and density in promise mode
* @tc.desc : getMediaContentBase64
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getMediaContentBase64_stage_test_0400', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContentBase64({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, 0).then(value => {
expect(value.length == 9078).assertTrue();
console.log('getMediaContentBase64_stage_test_0400 ' + value.length);
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETPLURALSTRINGVALUE_STAGE_0100
* @tc.name : getPluralStringValue with resource name in callback mode
* @tc.desc : getPluralStringValue
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getPluralStringValue_stage_test_0100', 0, async function (done) {
globalThis.yq.resourceManager.getPluralStringValue({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000010}, 2, (error, value) => {
expect(value !== null).assertTrue();
console.log('getPluralStringValue_stage_test_0100 ' + value);
expect(value).assertEqual('2 apples');
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETPLURALSTRINGVALUE_STAGE_0200
* @tc.name : getPluralStringValue with resource name in promise mode
* @tc.desc : getPluralStringValue
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getPluralStringValue_stage_test_0200', 0, async function (done) {
globalThis.yq.resourceManager.getPluralStringValue({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000010}, 2).then(value => {
expect(value !== null).assertTrue();
console.log('getPluralStringValue_stage_test_0200 ' + value);
expect(value).assertEqual('2 apples');
done();
})
})
/**
* @tc.number : SUB_GLOBAL_GETBOOLEAN_STAGE_0100
* @tc.name : getBoolean with resource name
* @tc.desc : getBoolean
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getBoolean_stage_test_0100', 0, async function (done) {
let value = globalThis.yq.resourceManager.getBoolean({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x0100000C});
console.log('getBoolean_stage_test_0100 ' + value);
expect(value).assertTrue();
done();
})
/**
* @tc.number : SUB_GLOBAL_GETNUMBER_STAGE_0100
* @tc.name : getNumber with resource name
* @tc.desc : getNumber
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getNumber_stage_test_0100', 0, async function (done) {
let value = globalThis.yq.resourceManager.getNumber({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000002});
console.log('getinteger_stage_test_0100 ' + value);
expect(value).assertEqual(100);
done();
})
/**
* @tc.number : SUB_GLOBAL_GETDRAWABLEDESCRIPTOR_STAGE_0100
* @tc.name : getDrawableDescriptor with resource name
* @tc.desc : getDrawableDescriptor
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('getDrawableDescriptor_stage_test_0100', 0, async function (done) {
let out = true;
let value = globalThis.yq.resourceManager.getDrawableDescriptor(
{ bundleName:"ohos.acts.globalstage", moduleName:"phone", id:0x01000011});
console.log('getDrawableDescriptor_stage_test_0100 ' + value);
if(value == null){
out = false;
}
console.log('getDrawableDescriptor_test_2100 ' + out);
expect(out).assertTrue();
done();
})
console.log('*************end globalStageTest*************');
})
}
}
global/global_stage/entry/src/main/resources/base/element/boolean.json
0 → 100644
浏览文件 @
906edaf6
{
"boolean"
:
[
{
"name"
:
"boolean_1"
,
"value"
:
true
},
{
"name"
:
"boolean_2"
,
"value"
:
false
},
{
"name"
:
"boolean_3"
,
"value"
:
"$boolean:boolean_4"
},
{
"name"
:
"boolean_4"
,
"value"
:
"$boolean:boolean_3"
}
]
}
\ No newline at end of file
global/global_stage/entry/src/main/resources/base/element/integer.json
0 → 100644
浏览文件 @
906edaf6
{
"integer"
:
[
{
"name"
:
"integer_1"
,
"value"
:
100
},
{
"name"
:
"integer_2"
,
"value"
:
200
}
]
}
\ No newline at end of file
global/global_stage/entry/src/main/resources/base/element/plural.json
0 → 100644
浏览文件 @
906edaf6
{
"plural"
:[
{
"name"
:
"plural_name"
,
"value"
:[
{
"quantity"
:
"one"
,
"value"
:
"%d apple"
},
{
"quantity"
:
"other"
,
"value"
:
"%d apples"
}
]
}
]
}
\ No newline at end of file
global/global_stage/entry/src/main/resources/base/element/strarray.json
0 → 100644
浏览文件 @
906edaf6
{
"strarray"
:
[
{
"name"
:
"sizeList"
,
"value"
:[
{
"value"
:
"small"
},
{
"value"
:
"middle"
},
{
"value"
:
"large"
},
{
"value"
:
"extra large"
}
]
},
{
"name"
:
"sizeList2"
,
"value"
:[
{
"value"
:
"$string:entry_label"
}
]
}
]
}
\ No newline at end of file
global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js
浏览文件 @
906edaf6
...
@@ -119,42 +119,6 @@ describe('resMgrTest', function () {
...
@@ -119,42 +119,6 @@ describe('resMgrTest', function () {
})
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_0620
* @tc.name test getString method with resource param in callback mode
* @tc.desc get the string in callback mode
*/
it
(
'
getStringValue_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getStringValue
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000008
},
(
err
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getStringValue_test_001
'
+
value
);
done
();
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_0640
* @tc.name test getString method with resource param in promise mode
* @tc.desc get the string in promise mode
*/
it
(
'
getStringValue_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
console
.
info
(
`getStringValue_test_002
${
JSON
.
stringify
(
mgr
)}
`
)
mgr
.
getStringValue
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000008
}).
then
(
value
=>
{
console
.
info
(
`getStringValue_test_002 promise
${
JSON
.
stringify
(
error
)}
`
)
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getStringValue_test_002
'
+
value
);
})
})
done
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_0500
* @tc.number SUB_GLOBAL_RESMGR_JS_0500
* @tc.name test getString method in callback mode
* @tc.name test getString method in callback mode
...
@@ -461,40 +425,6 @@ describe('resMgrTest', function () {
...
@@ -461,40 +425,6 @@ describe('resMgrTest', function () {
})
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_0820
* @tc.name test getStringArray method with resource param in callback mode
* @tc.desc get the string array in callback mode
*/
it
(
'
getStringArrayValue_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getStringArrayValue
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x0100000a
},
(
err
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getStringArrayValue_test_001
'
+
value
);
done
();
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_0840
* @tc.name test getStringArray method with resource param in promise mode
* @tc.desc get the string array in promise mode
*/
it
(
'
getStringArrayValue_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getStringArrayValue
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x0100000a
}).
then
(
value
=>
{
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getStringArrayValue_test_002
'
+
value
);
})
})
done
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_0700
* @tc.number SUB_GLOBAL_RESMGR_JS_0700
* @tc.name test getStringArray method in callback mode
* @tc.name test getStringArray method in callback mode
...
@@ -570,40 +500,6 @@ describe('resMgrTest', function () {
...
@@ -570,40 +500,6 @@ describe('resMgrTest', function () {
})
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_1020
* @tc.name test getMedia method with resource param in callback mode
* @tc.desc get the media in callback mode
*/
it
(
'
getMediaContent_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMediaContent
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000017
},
(
err
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getMediaContent_test_001
'
+
value
);
done
();
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_1040
* @tc.name test getMedia method with resource param in promise mode
* @tc.desc get the media in promise mode
*/
it
(
'
getMediaContent_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMediaContent
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000017
}).
then
(
value
=>
{
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getMediaContent_test_002
'
+
value
);
})
})
done
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_0900
* @tc.number SUB_GLOBAL_RESMGR_JS_0900
* @tc.name test getMedia method in callback mode
* @tc.name test getMedia method in callback mode
...
@@ -664,40 +560,6 @@ describe('resMgrTest', function () {
...
@@ -664,40 +560,6 @@ describe('resMgrTest', function () {
})
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_1220
* @tc.name test getMediaBase64 method with resource param in callback mode
* @tc.desc get the media base64 in callback mode
*/
it
(
'
getMediaContentBase64_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMediaContentBase64
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000017
},
(
err
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getMediaContentBase64_test_001
'
+
value
);
done
();
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_1240
* @tc.name test getMediaBase64 method with resource param in promise mode
* @tc.desc get the media base64 in promise mode
*/
it
(
'
getMediaContentBase64_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMediaContentBase64
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000017
}).
then
(
value
=>
{
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getMediaContentBase64_test_002
'
+
value
);
})
})
done
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_1100
* @tc.number SUB_GLOBAL_RESMGR_JS_1100
* @tc.name test getMediaBase64 method in callback mode
* @tc.name test getMediaBase64 method in callback mode
...
@@ -1051,40 +913,6 @@ describe('resMgrTest', function () {
...
@@ -1051,40 +913,6 @@ describe('resMgrTest', function () {
})
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_1820
* @tc.name test getPluralString method with resource param in callback mode
* @tc.desc get the plural string in callback mode
*/
it
(
'
getPluralStringValue_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getPluralStringValue
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000012
},
1
,
(
error
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getPluralStringValue_test_001
'
+
value
);
done
();
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_1840
* @tc.name test getPluralString method with resource param in promise mode
* @tc.desc get the plural string in promise mode
*/
it
(
'
getPluralStringValue_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getPluralStringValue
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000012
},
1
).
then
(
value
=>
{
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getPluralStringValue_test_002
'
+
value
);
})
})
done
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_1700
* @tc.number SUB_GLOBAL_RESMGR_JS_1700
* @tc.name test getPluralString method in callback mode
* @tc.name test getPluralString method in callback mode
...
@@ -1565,22 +1393,6 @@ describe('resMgrTest', function () {
...
@@ -1565,22 +1393,6 @@ describe('resMgrTest', function () {
})
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_3450
* @tc.name test getStringSync method with resource param
* @tc.desc get the string in sync mode
*/
it
(
'
getStringSync_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
let
value
=
mgr
.
getStringSync
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000008
});
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getStringSync_test_002
'
+
value
);
})
done
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_3500
* @tc.number SUB_GLOBAL_RESMGR_JS_3500
* @tc.name test getStringByNameSync method
* @tc.name test getStringByNameSync method
...
@@ -1632,22 +1444,6 @@ describe('resMgrTest', function () {
...
@@ -1632,22 +1444,6 @@ describe('resMgrTest', function () {
})
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_3650
* @tc.name test getBoolean method with resource param
* @tc.desc get the boolean value
*/
it
(
'
getBoolean_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
let
value
=
mgr
.
getBoolean
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x0100000c
});
console
.
log
(
'
getBoolean_test_002
'
+
value
);
expect
(
value
!==
null
).
assertTrue
();
done
();
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_3700
* @tc.number SUB_GLOBAL_RESMGR_JS_3700
* @tc.name test getBooleanByName method
* @tc.name test getBooleanByName method
...
@@ -1678,22 +1474,6 @@ describe('resMgrTest', function () {
...
@@ -1678,22 +1474,6 @@ describe('resMgrTest', function () {
})
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_3850
* @tc.name test getNumber method with interger resource param
* @tc.desc get the interger value
*/
it
(
'
getinteger_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
let
value
=
mgr
.
getNumber
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000000
});
console
.
log
(
'
getinteger_test_002
'
+
value
);
expect
(
value
!==
null
).
assertTrue
();
done
();
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_3900
* @tc.number SUB_GLOBAL_RESMGR_JS_3900
* @tc.name test getNumberByName with interger
* @tc.name test getNumberByName with interger
...
@@ -1722,22 +1502,6 @@ describe('resMgrTest', function () {
...
@@ -1722,22 +1502,6 @@ describe('resMgrTest', function () {
})
})
})
})
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_4050
* @tc.name test getNumber with float resource param
* @tc.desc get the float value
*/
it
(
'
getfloat_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
let
value
=
mgr
.
getNumber
({
bundleName
:
"
ohos.resmgr.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000015
});
console
.
log
(
'
getfloat_test_002
'
+
value
);
expect
(
value
!==
null
).
assertTrue
();
done
();
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_RESMGR_JS_4100
* @tc.number SUB_GLOBAL_RESMGR_JS_4100
* @tc.name test getNumberByName with float
* @tc.name test getNumberByName with float
...
@@ -2198,26 +1962,6 @@ describe('resMgrTest', function () {
...
@@ -2198,26 +1962,6 @@ describe('resMgrTest', function () {
done
();
done
();
})
})
/**
* @tc.number SUB_GLOBAL_RESMGR_DRAWABLE_JS_2100
* @tc.name getDrawableDescriptor with resource object
* @tc.desc test the getDrawableDescriptor method
*/
it
(
'
getDrawableDescriptor_test_2100
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
let
out
=
true
;
let
value
=
mgr
.
getDrawableDescriptor
(
{
bundleName
:
"
ohos.intl.test
"
,
moduleName
:
"
entry
"
,
id
:
0x01000018
});
console
.
log
(
'
getDrawableDescriptor_test_2100
'
+
value
);
if
(
value
==
null
){
out
=
false
;
}
console
.
log
(
'
getDrawableDescriptor_test_2100
'
+
out
);
expect
(
out
).
assertFalse
();
})
done
();
})
/**
/**
* @tc.number SUB_GLOBAL_RESMGR_RAWFILELIST_JS_0100
* @tc.number SUB_GLOBAL_RESMGR_RAWFILELIST_JS_0100
* @tc.name getRawFileList with callback method
* @tc.name getRawFileList with callback method
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录