diff --git a/global/global_stage/entry/src/main/ets/test/globalstage.test.ets b/global/global_stage/entry/src/main/ets/test/globalstage.test.ets index 89c4b4f618cf90f598a5f4374cba1ac42d82b81e..9da51dfa0c48b5696fca3c1d7c6c1865f9e4b832 100644 --- a/global/global_stage/entry/src/main/ets/test/globalstage.test.ets +++ b/global/global_stage/entry/src/main/ets/test/globalstage.test.ets @@ -18,6 +18,8 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from export default function globalStageTest() { describe("globalStageTest", function () { + console.log('*************end globalStageTest*************'); + beforeAll(async function () { console.info("beforeAll case"); }); @@ -32,95 +34,416 @@ export default function globalStageTest() { }); /** - * @tc.number : SUB_GLOBAL_GETSTRINGSYNC_0400 + * @tc.number : SUB_GLOBAL_GETSTRINGSYNC_STAGE_0100 * @tc.name : getStringSync with resource object and format value * @tc.desc : getStringSync * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('getStringSync_test_0400', 0, async function (done) { + it('getStringSync_stagetest_0100', 0, async function (done) { let mgr = globalThis.yq.resourceManager; try{ let value = mgr.getStringSync( { bundleName:"ohos.acts.globalstage", moduleName:"phone", id:0x01000000}, 100); - console.log('getStringSync_test_0400 1' + value); - expect(value != null).assertTrue(); + console.log('getStringSync_stagetest_0100 1' + value); + expect(value).assertEqual('ohosProject 100'); }catch(error){ - console.log('getStringSync_test_0400 3' + error.code); + console.log('getStringSync_stagetest_0100 3' + error.code); expect(error.code == 401).assertTrue(); - console.log('getStringSync_test_0400 3' + error.message); + console.log('getStringSync_stagetest_0100 3' + error.message); } done(); }) /** - * @tc.number : SUB_GLOBAL_GETSTRINGSYNC_0410 + * @tc.number : SUB_GLOBAL_GETSTRINGSYNC_STAGE_0200 * @tc.name : getStringSync with resource object * @tc.desc : getStringSync * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('getStringSync_test_0410', 0, async function (done) { + it('getStringSync_stagetest_0200', 0, async function (done) { let mgr = globalThis.yq.resourceManager; try{ let value = mgr.getStringSync( { bundleName:"ohos.acts.globalstage", moduleName:"phone", id:0x01000000}); - console.log('getStringSync_test_0410 1' + value); - expect(value != null).assertTrue(); + console.log('getStringSync_stagetest_0200 1' + value); + expect(value).assertEqual('ohosProject %d'); }catch(error){ - console.log('getStringSync_test_0410 2' + error.code); + console.log('getStringSync_stagetest_0200 2' + error.code); expect(error.code == 401).assertTrue(); - console.log('getStringSync_test_0410 3' + error.message); + console.log('getStringSync_stagetest_0200 3' + error.message); } done(); }) /** - * @tc.number : SUB_GLOBAL_GETSTRINGSYNC_0411 + * @tc.number : SUB_GLOBAL_GETSTRINGBYNAME_STAGE_0100 * @tc.name : getStringByNameSync with resource name * @tc.desc : getStringByNameSync * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('getStringSync_test_0411', 0, async function (done) { + it('getStringByNameSync_stagetest_0100', 0, async function (done) { try{ let value = globalThis.yq.resourceManager.getStringByNameSync('app_name'); - console.log('getStringSync_test_0411 1' + value); - expect(value != null).assertTrue(); + console.log('getStringByNameSync_stagetest_0100 1' + value); + expect(value).assertEqual('ohosProject %d'); } catch(e){ - console.log('getStringSync_test_0411 2' + e.code); - console.log('getStringSync_test_0411 3' + e.code); + console.log('getStringByNameSync_stagetest_0100 2' + e.code); + console.log('getStringByNameSync_stagetest_0100 3' + e.code); } done(); }) /** - * @tc.number : SUB_GLOBAL_GETSTRINGSYNC_0411 + * @tc.number : SUB_GLOBAL_GETSTRINGBYNAME_STAGE_0200 * @tc.name : getStringByNameSync with resource name and format value * @tc.desc : getStringByNameSync * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('getStringSync_test_0412', 0, async function (done) { + it('getStringByNameSync_stagetest_0200', 0, async function (done) { try{ let value = globalThis.yq.resourceManager.getStringByNameSync('app_name',100); - console.log('getStringSync_test_0412 1' + value); - expect(value != null).assertTrue(); + console.log('getStringByNameSync_stagetest_0200 1' + value); + expect(value).assertEqual('ohosProject 100'); } catch(e){ - console.log('getStringSync_test_0412 2' + e.code); - console.log('getStringSync_test_0412 3' + e.code); + console.log('getStringByNameSync_stagetest_0200 2' + e.code); + console.log('getStringByNameSync_stagetest_0200 3' + e.code); } 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*************'); + }) } diff --git a/global/global_stage/entry/src/main/resources/base/element/boolean.json b/global/global_stage/entry/src/main/resources/base/element/boolean.json new file mode 100644 index 0000000000000000000000000000000000000000..fd7c3683d38976440dcd3292f33b6d89e862c384 --- /dev/null +++ b/global/global_stage/entry/src/main/resources/base/element/boolean.json @@ -0,0 +1,20 @@ +{ + "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 diff --git a/global/global_stage/entry/src/main/resources/base/element/integer.json b/global/global_stage/entry/src/main/resources/base/element/integer.json new file mode 100644 index 0000000000000000000000000000000000000000..7eac0f15365042fd333c8219b83fe74f281771c9 --- /dev/null +++ b/global/global_stage/entry/src/main/resources/base/element/integer.json @@ -0,0 +1,12 @@ +{ + "integer": [ + { + "name": "integer_1", + "value": 100 + }, + { + "name": "integer_2", + "value": 200 + } + ] + } \ No newline at end of file diff --git a/global/global_stage/entry/src/main/resources/base/element/plural.json b/global/global_stage/entry/src/main/resources/base/element/plural.json new file mode 100644 index 0000000000000000000000000000000000000000..1e4c2f20e80630c7e22cbd0eb53b640349d6fd82 --- /dev/null +++ b/global/global_stage/entry/src/main/resources/base/element/plural.json @@ -0,0 +1,17 @@ +{ + "plural":[ + { + "name":"plural_name", + "value":[ + { + "quantity": "one", + "value": "%d apple" + }, + { + "quantity":"other", + "value":"%d apples" + } + ] + } + ] +} \ No newline at end of file diff --git a/global/global_stage/entry/src/main/resources/base/element/strarray.json b/global/global_stage/entry/src/main/resources/base/element/strarray.json new file mode 100644 index 0000000000000000000000000000000000000000..27ba83aa20c43cfaa008068f30f86d4260ac4996 --- /dev/null +++ b/global/global_stage/entry/src/main/resources/base/element/strarray.json @@ -0,0 +1,29 @@ +{ + "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 diff --git a/global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js b/global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js index 570ee9209e6783a3cb0495af2b83ddb0b9addaf6..9f25119bae2195b868aeaacbe4d72d4c2eb81ae2 100644 --- a/global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js +++ b/global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js @@ -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.name test getString method in callback mode @@ -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.name test getStringArray method in callback mode @@ -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.name test getMedia method in callback mode @@ -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.name test getMediaBase64 method in callback mode @@ -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.name test getPluralString method in callback mode @@ -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.name test getStringByNameSync method @@ -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.name test getBooleanByName method @@ -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.name test getNumberByName with interger @@ -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.name test getNumberByName with float @@ -2198,26 +1962,6 @@ describe('resMgrTest', function () { 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.name getRawFileList with callback method