Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c06967aa
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看板
未验证
提交
c06967aa
编写于
6月 20, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 20, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9040 add color cases
Merge pull request !9040 from 杨清/master
上级
40b9ce27
c8fb75c4
变更
4
展开全部
显示空白变更内容
内联
并排
Showing
4 changed file
with
857 addition
and
38 deletion
+857
-38
global/global_stage/entry/src/main/ets/test/globalstage.test.ets
...global_stage/entry/src/main/ets/test/globalstage.test.ets
+58
-11
global/global_stage/entry/src/main/resources/base/element/colors.json
...l_stage/entry/src/main/resources/base/element/colors.json
+8
-0
global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js
.../resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js
+767
-27
global/resmgr_standard/resmgrjs/src/main/resources/base/element/colors.json
...dard/resmgrjs/src/main/resources/base/element/colors.json
+24
-0
未找到文件。
global/global_stage/entry/src/main/ets/test/globalstage.test.ets
浏览文件 @
c06967aa
...
...
@@ -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:0x0100001
1
}, (err, value) => {
id:0x0100001
2
}, (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:0x0100001
1
}).then(value => {
id:0x0100001
2
}).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:0x0100001
1
}, 0 , (err, value) => {
id:0x0100001
2
}, 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:0x0100001
1
}, 0).then(value => {
id:0x0100001
2
}, 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:0x0100001
1
}, (err, value) => {
id:0x0100001
2
}, (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:0x0100001
1
}).then(value => {
id:0x0100001
2
}).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:0x0100001
1
}, 0 , (err, value) => {
id:0x0100001
2
}, 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:0x0100001
1
}, 0).then(value => {
id:0x0100001
2
}, 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:0x0100001
0
}, 2, (error, value) => {
id:0x0100001
1
}, 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:0x0100001
0
}, 2).then(value => {
id:0x0100001
1
}, 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:0x0100001
1
});
{ bundleName:"ohos.acts.globalstage", moduleName:"phone", id:0x0100001
2
});
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*************');
})
}
global/global_stage/entry/src/main/resources/base/element/colors.json
0 → 100644
浏览文件 @
c06967aa
{
"color"
:
[
{
"name"
:
"color_test1"
,
"value"
:
"#FFFFFF"
}
]
}
\ No newline at end of file
global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js
浏览文件 @
c06967aa
此差异已折叠。
点击以展开。
global/resmgr_standard/resmgrjs/src/main/resources/base/element/colors.json
0 → 100644
浏览文件 @
c06967aa
{
"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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录