Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
dfbfe0c7
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看板
未验证
提交
dfbfe0c7
编写于
8月 02, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 02, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9662 【ACE子系统】修改测试用例
Merge pull request !9662 from hekun/master
上级
37c94b8f
b950c19a
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
495 addition
and
910 deletion
+495
-910
arkui/ace_ets_component/entry/src/main/ets/test/TextStyleJsunit.test.ets
...omponent/entry/src/main/ets/test/TextStyleJsunit.test.ets
+0
-114
arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/text.ets
...onent_three/entry/src/main/ets/MainAbility/pages/text.ets
+1
-1
arkui/ace_ets_component_three/entry/src/main/ets/test/SpanJsunit.test.ets
...mponent_three/entry/src/main/ets/test/SpanJsunit.test.ets
+0
-51
arkui/ace_ets_component_three/entry/src/main/ets/test/TextJsunit.test.ets
...mponent_three/entry/src/main/ets/test/TextJsunit.test.ets
+3
-28
arkui/ace_ets_components_ux/ace_ets_component_progress/src/main/ets/TestAbility/pages/IndexSec.ets
...nent_progress/src/main/ets/TestAbility/pages/IndexSec.ets
+384
-337
arkui/ace_ets_components_ux/ace_ets_component_progress/src/main/ets/test/MessageManager.ets
...s_component_progress/src/main/ets/test/MessageManager.ets
+54
-0
arkui/ace_ets_components_ux/ace_ets_component_progress/src/main/ets/test/progressSec.ets
..._ets_component_progress/src/main/ets/test/progressSec.ets
+53
-379
未找到文件。
arkui/ace_ets_component/entry/src/main/ets/test/TextStyleJsunit.test.ets
浏览文件 @
dfbfe0c7
...
@@ -45,120 +45,6 @@ export default function textStyleJsunit() {
...
@@ -45,120 +45,6 @@ export default function textStyleJsunit() {
console.info("textStyle after each called");
console.info("textStyle after each called");
});
});
it('testTextStyle001', 0, async function (done) {
console.info('[testTextStyle001] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('fontColor');
console.info("[testTextStyle001] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testTextStyle001] fontColor: " + obj.$attrs.fontColor);
expect(obj.$attrs.fontColor).assertEqual('#FF000000');
done();
});
it('testTextStyle002', 0, async function (done) {
console.info('[testTextStyle002] START');
try {
let eventData = {
data: {
"fontColor": Color.Blue
}
}
let indexEvent = {
eventId: 37,
priority: events_emitter.EventPriority.LOW
}
console.info("[testTextStyle002] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testTextStyle002] change component data error: " + err.message);
}
await Utils.sleep(3000);
let strJson = getInspectorByKey('fontColor');
console.info("[testTextStyle002] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testTextStyle002] fontColor: " + obj.$attrs.fontColor);
expect(obj.$attrs.fontColor).assertEqual('#FF000000');
done();
});
it('testTextStyle003', 0, async function (done) {
console.info('[testTextStyle003] START');
try {
let eventData = {
data: {
"fontColor": 0x80000000
}
}
let indexEvent = {
eventId: 37,
priority: events_emitter.EventPriority.LOW
}
console.info("[testTextStyle003] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testTextStyle003] change component data error: " + err.message);
}
await Utils.sleep(3000);
let strJson = getInspectorByKey('fontColor');
console.info("[testTextStyle003] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testTextStyle003] fontColor: " + obj.$attrs.fontColor);
expect(obj.$attrs.fontColor).assertEqual('#FF000000');
done();
});
it('testTextStyle004', 0, async function (done) {
console.info('[testTextStyle004] START');
try {
let eventData = {
data: {
"fontColor": 0x7FFFFFFF
}
}
let indexEvent = {
eventId: 37,
priority: events_emitter.EventPriority.LOW
}
console.info("[testTextStyle004] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testTextStyle004] change component data error: " + err.message);
}
await Utils.sleep(3000);
let strJson = getInspectorByKey('fontColor');
console.info("[testTextStyle004] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testTextStyle004] fontColor: " + obj.$attrs.fontColor);
expect(obj.$attrs.fontColor).assertEqual('#FF000000');
done();
});
it('testTextStyle005', 0, async function (done) {
console.info('[testTextStyle005] START');
try {
let eventData = {
data: {
"fontColor": 'error'
}
}
let indexEvent = {
eventId: 37,
priority: events_emitter.EventPriority.LOW
}
console.info("[testTextStyle005] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testTextStyle005] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('fontColor');
console.info("[testTextStyle005] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testTextStyle005] fontColor: " + obj.$attrs.fontColor);
expect(obj.$attrs.fontColor).assertEqual('#FF000000');
done();
});
it('testTextStyle006', 0, async function (done) {
it('testTextStyle006', 0, async function (done) {
console.info('[testTextStyle006] START');
console.info('[testTextStyle006] START');
...
...
arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/text.ets
浏览文件 @
dfbfe0c7
...
@@ -18,7 +18,7 @@ import events_emitter from '@ohos.events.emitter'
...
@@ -18,7 +18,7 @@ import events_emitter from '@ohos.events.emitter'
@Component
@Component
struct TextExample {
struct TextExample {
@State fontSize: number = 9;
@State fontSize: number = 9;
@State fontColor: string = "
0xCCCCCC
";
@State fontColor: string = "
#330A59F8
";
@State textAlign: TextAlign = TextAlign.Start;
@State textAlign: TextAlign = TextAlign.Start;
@State textOverflow: TextOverflow = TextOverflow.Clip;
@State textOverflow: TextOverflow = TextOverflow.Clip;
@State decoration: TextDecorationType = TextDecorationType.None;
@State decoration: TextDecorationType = TextDecorationType.None;
...
...
arkui/ace_ets_component_three/entry/src/main/ets/test/SpanJsunit.test.ets
浏览文件 @
dfbfe0c7
...
@@ -183,56 +183,5 @@ export default function spanJsunit() {
...
@@ -183,56 +183,5 @@ export default function spanJsunit() {
done();
done();
});
});
it('testSpan008', 0, async function (done) {
console.info('[testSpan008] START');
try {
let eventData = {
data: {
"fontColorValue": 'abc'
}
}
let indexEvent = {
eventId: 1031,
priority: events_emitter.EventPriority.LOW
}
console.info("[testSpan008] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testSpan008] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('fontColor');
console.info("[testSpan008] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testSpan008] fontColor:" + obj);
expect(obj.$attrs.fontColor).assertEqual('#FF000990');
done();
});
it('testSpan009', 0, async function (done) {
console.info('[testSpan009] START');
try {
let eventData = {
data: {
"fontColorValue": '-1'
}
}
let indexEvent = {
eventId: 1032,
priority: events_emitter.EventPriority.LOW
}
console.info("[testSpan009] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testSpan009] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('fontColor');
console.info("[testSpan009] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testSpan009] fontColor:" + obj);
expect(obj.$attrs.fontColor).assertEqual('#FF000990');
done();
});
})
})
}
}
\ No newline at end of file
arkui/ace_ets_component_three/entry/src/main/ets/test/TextJsunit.test.ets
浏览文件 @
dfbfe0c7
...
@@ -101,7 +101,7 @@ export default function textJsunit() {
...
@@ -101,7 +101,7 @@ export default function textJsunit() {
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("testText_0400 component obj is: " + JSON.stringify(obj));
console.info("testText_0400 component obj is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Text');
expect(obj.$type).assertEqual('Text');
expect(obj.$attrs.fontColor).assertEqual('#
FF000000
');
expect(obj.$attrs.fontColor).assertEqual('#
330A59F8
');
console.info('testText_0400 END');
console.info('testText_0400 END');
done();
done();
});
});
...
@@ -217,38 +217,13 @@ export default function textJsunit() {
...
@@ -217,38 +217,13 @@ export default function textJsunit() {
done();
done();
});
});
it('testText_1100', 0, async function (done) {
console.info('testText_1100 START');
try {
let eventData = {
data: {
"fontColor": "-a",
}
}
let indexEvent = {
eventId: 230,
priority: events_emitter.EventPriority.LOW
}
console.info("testText_1100 start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("testText_1100 change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJsonNew = getInspectorByKey('text');
let objNew = JSON.parse(strJsonNew);
console.info("testText_1100 component objNew is: " + JSON.stringify(objNew.$attrs.fontColor));
expect(objNew.$attrs.fontColor).assertEqual('#330A59F7');
console.info('testText_1100 END');
done();
});
it('testText_1200', 0, async function (done) {
it('testText_1200', 0, async function (done) {
console.info('testText_1200 START');
console.info('testText_1200 START');
try {
try {
let eventData = {
let eventData = {
data: {
data: {
"fontColor": "
12321321
",
"fontColor": "
#FFBC0229
",
}
}
}
}
let indexEvent = {
let indexEvent = {
...
...
arkui/ace_ets_components_ux/ace_ets_component_progress/src/main/ets/TestAbility/pages/IndexSec.ets
浏览文件 @
dfbfe0c7
此差异已折叠。
点击以展开。
arkui/ace_ets_components_ux/ace_ets_component_progress/src/main/ets/test/MessageManager.ets
0 → 100644
浏览文件 @
dfbfe0c7
/**
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface Callback {
(message:any):void
}
export class MessageManager {
callback:Callback
callbacks:Map<string,Callback> = new Map()
constructor() {
}
registerCallback(callback:Callback , type?:string) {
if (type == undefined) {
console.error('registerCallback callback set')
this.callback = callback
return
}
this.callbacks.set(type,callback)
}
notify(message:any, type?:string) {
if (type == undefined) {
this.callback(message)
return
}
let tmpCallback:Callback = this.callbacks.get(type)
if (tmpCallback === undefined) {
console.error('callbacks has no callback for type ' + type)
return
}
tmpCallback(message)
}
clear() {
this.callbacks.clear()
this.callback = null
}
}
\ No newline at end of file
arkui/ace_ets_components_ux/ace_ets_component_progress/src/main/ets/test/progressSec.ets
浏览文件 @
dfbfe0c7
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录