提交 c8fb75c4 编写于 作者: Y y00314596

add by yangqing3@huawei.com

Signed-off-by: Ny00314596 <yangqing3@huawei.com>
上级 61233ad5
......@@ -218,7 +218,7 @@ export default function globalStageTest() {
it('getMediaContent_stage_test_0100', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContent({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, (err, value) => {
id:0x01000012}, (err, value) => {
expect(value.length == 6790).assertTrue();
console.log('getMediaContent_stage_test_0100 ' + value.length);
done();
......@@ -236,7 +236,7 @@ export default function globalStageTest() {
it('getMediaContent_stage_test_0200', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContent({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}).then(value => {
id:0x01000012}).then(value => {
expect(value.length == 6790).assertTrue();
console.log('getMediaContent_stage_test_0200 ' + value.length);
done();
......@@ -254,7 +254,7 @@ export default function globalStageTest() {
it('getMediaContent_stage_test_0300', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContent({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, 0 , (err, value) => {
id:0x01000012}, 0 , (err, value) => {
expect(value.length == 6790).assertTrue();
console.log('getMediaContent_stage_test_0300 ' + value.length);
done();
......@@ -272,7 +272,7 @@ export default function globalStageTest() {
it('getMediaContent_stage_test_0400', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContent({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, 0).then(value => {
id:0x01000012}, 0).then(value => {
expect(value.length == 6790).assertTrue();
console.log('getMediaContent_stage_test_0400 ' + value.length);
done();
......@@ -290,7 +290,7 @@ export default function globalStageTest() {
it('getMediaContentBase64_stage_test_0100', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContentBase64({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, (err, value) => {
id:0x01000012}, (err, value) => {
expect(value.length == 9078).assertTrue();
console.log('getMediaContentBase64_stage_test_0100 ' + value.length);
done();
......@@ -308,7 +308,7 @@ export default function globalStageTest() {
it('getMediaContentBase64_stage_test_0200', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContentBase64({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}).then(value => {
id:0x01000012}).then(value => {
expect(value.length == 9078).assertTrue();
console.log('getMediaContentBase64_stage_test_0200 ' + value.length);
done();
......@@ -326,7 +326,7 @@ export default function globalStageTest() {
it('getMediaContentBase64_stage_test_0300', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContentBase64({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, 0 , (err, value) => {
id:0x01000012}, 0 , (err, value) => {
expect(value.length == 9078).assertTrue();
console.log('getMediaContentBase64_stage_test_0300 ' + value.length);
done();
......@@ -344,7 +344,7 @@ export default function globalStageTest() {
it('getMediaContentBase64_stage_test_0400', 0, async function (done) {
globalThis.yq.resourceManager.getMediaContentBase64({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000011}, 0).then(value => {
id:0x01000012}, 0).then(value => {
expect(value.length == 9078).assertTrue();
console.log('getMediaContentBase64_stage_test_0400 ' + value.length);
done();
......@@ -362,7 +362,7 @@ export default function globalStageTest() {
it('getPluralStringValue_stage_test_0100', 0, async function (done) {
globalThis.yq.resourceManager.getPluralStringValue({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000010}, 2, (error, value) => {
id:0x01000011}, 2, (error, value) => {
expect(value !== null).assertTrue();
console.log('getPluralStringValue_stage_test_0100 ' + value);
expect(value).assertEqual('2 apples');
......@@ -381,7 +381,7 @@ export default function globalStageTest() {
it('getPluralStringValue_stage_test_0200', 0, async function (done) {
globalThis.yq.resourceManager.getPluralStringValue({bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000010}, 2).then(value => {
id:0x01000011}, 2).then(value => {
expect(value !== null).assertTrue();
console.log('getPluralStringValue_stage_test_0200 ' + value);
expect(value).assertEqual('2 apples');
......@@ -434,7 +434,7 @@ export default function globalStageTest() {
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});
{ bundleName:"ohos.acts.globalstage", moduleName:"phone", id:0x01000012});
console.log('getDrawableDescriptor_stage_test_0100 ' + value);
if(value == null){
out = false;
......@@ -444,6 +444,53 @@ export default function globalStageTest() {
done();
})
/* *
* @tc.number SUB_GLOBAL_GETCOLOR_STAGE_JS_0100
* @tc.name test getColor method with resource param in callback mode
* @tc.desc get the color in callback mode
*/
it('getColor_test_0100', 0, async function (done) {
globalThis.yq.resourceManager.getColor({ bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000010}, (err, value) => {
expect(value !== null).assertTrue();
console.log('getColor_test_0100 ' + value);
expect(value).assertEqual(4294967295);
done();
})
})
/* *
* @tc.number SUB_GLOBAL_GETCOLOR_STAGE_JS_0200
* @tc.name test getColor method with resource param in promise mode
* @tc.desc get the color in promise mode
*/
it('getColor_test_0200', 0, async function (done) {
globalThis.yq.resourceManager.getColor({ bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000010}).then(value => {
expect(value !== null).assertTrue();
console.log('getColor_test_0200 ' + value);
expect(value).assertEqual(4294967295);
done();
})
})
/* *
* @tc.number SUB_GLOBAL_GETCOLORSYNC_STAGE_JS_0100
* @tc.name test getColorSync method with resource param in promise mode
* @tc.desc get the sync color in promise mode
*/
it('getColorSync_test_0100', 0, async function (done) {
let value = globalThis.yq.resourceManager.getColorSync({ bundleName:"ohos.acts.globalstage",
moduleName:"phone",
id:0x01000010});
expect(value !== null).assertTrue();
console.log('getColorSync_test_0100 ' + value);
expect(value).assertEqual(4294967295);
done();
})
console.log('*************end globalStageTest*************');
})
}
{
"color": [
{
"name": "color_test1",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
{
"color": [
{
"name": "color_test1",
"value": "#FF00FF"
},
{
"name": "color_test2",
"value": "#FF0011"
},
{
"name": "color_test3",
"value": "$color:color_test4"
},
{
"name": "color_test4",
"value": "$color:color_test3"
},
{
"name": "color_test5",
"value": "$color:"
}
]
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册