Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6b6fc67f
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
6b6fc67f
编写于
5月 23, 2023
作者:
O
openharmony_ci
提交者:
Gitee
5月 23, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8721 【ACE子系统】适配测试用例
Merge pull request !8721 from hekun/master
上级
8926c5b6
02e44210
变更
13
显示空白变更内容
内联
并排
Showing
13 changed file
with
51 addition
and
58 deletion
+51
-58
arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/enable.ets
...component/entry/src/main/ets/MainAbility/pages/enable.ets
+3
-4
arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/swiper.ets
...component/entry/src/main/ets/MainAbility/pages/swiper.ets
+1
-2
arkui/ace_ets_component/entry/src/main/ets/test/EnableJsunit.test.ets
...s_component/entry/src/main/ets/test/EnableJsunit.test.ets
+30
-30
arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets
...s_component/entry/src/main/ets/test/SwiperJsunit.test.ets
+6
-6
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list.ets
...ent_apilack/entry/src/main/ets/MainAbility/pages/list.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/test/listTest.test.ets
...mponent_apilack/entry/src/main/ets/test/listTest.test.ets
+2
-2
arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets
...ponent_apilack/entry/src/main/ets/test/list_item.test.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/test/polyLine.test.ets
...mponent_apilack/entry/src/main/ets/test/polyLine.test.ets
+2
-2
arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets
...component_apilack/entry/src/main/ets/test/swiper.test.ets
+1
-3
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/swiper.test.ets
...omponent_attrlack/entry/src/main/ets/test/swiper.test.ets
+1
-2
arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/select.ets
...nent_five/entry/src/main/ets/MainAbility/pages/select.ets
+2
-3
arkui/ace_ets_standard/entry/src/main/ets/test/DividerJsunit.test.ets
...s_standard/entry/src/main/ets/test/DividerJsunit.test.ets
+1
-1
arkui/ace_standard/Test.json
arkui/ace_standard/Test.json
+0
-1
未找到文件。
arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/enable.ets
浏览文件 @
6b6fc67f
// @ts-nocheck
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
@@ -20,7 +19,7 @@ import events_emitter from '@ohos.events.emitter'
@Entry
@Component
struct EnabledExample {
@State enabled: boolean = true;
@State enabled
d
: boolean = true;
@State text: string = "enable";
onPageShow() {
...
...
@@ -44,7 +43,7 @@ struct EnabledExample {
if (eventData != null) {
console.info("[stateChangCallBack] state change called: " + JSON.stringify(eventData));
if (eventData.data.enabled != null) {
this.enabled = eventData.data.enabled
this.enabled
d
= eventData.data.enabled
}
if (eventData.data.text != null) {
this.text = eventData.data.text
...
...
@@ -61,7 +60,7 @@ struct EnabledExample {
Button(this.text)
.key('enabled')
.backgroundColor(0x317aff)
.enabled(this.enabled)
.enabled(this.enabled
d
)
}
.width('100%')
.padding({ top: 5 })
...
...
arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/swiper.ets
浏览文件 @
6b6fc67f
// @ts-nocheck
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
@@ -60,7 +59,7 @@ struct SwiperExample {
@State onActionCalledTwo: boolean = false;
@State onActionCalledThree: boolean = false;
private
aboutToAppear(): void {
aboutToAppear(): void {
let list = []
for (var i = 1; i <= 10; i++) {
list.push(i.toString());
...
...
arkui/ace_ets_component/entry/src/main/ets/test/EnableJsunit.test.ets
浏览文件 @
6b6fc67f
...
...
@@ -55,34 +55,6 @@ export default function enableJsunit() {
console.info('[testEnable01] END');
done();
});
it('testEnable02', 0, async function (done) {
console.info('[testEnable02] START');
try {
var eventData = {
data: {
"enabled": false,
"text": "disable"
}
}
var innerEvent = {
eventId: 93,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEnable02] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEnable02] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('enabled');
let obj = JSON.parse(strJson);
console.info("[testEnable02] obj is: " + JSON.stringify(obj.$attrs.enabled));
expect(obj.$attrs.enabled).assertEqual(false);
console.info('testEnable02 END');
done();
});
it('testEnable03', 0, async function (done) {
console.info('[testEnable03] START');
try {
...
...
@@ -104,7 +76,7 @@ export default function enableJsunit() {
let strJson = getInspectorByKey('enabled');
let obj = JSON.parse(strJson);
console.info("[testEnable03] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.enabled).assertEqual(
fals
e);
expect(obj.$attrs.enabled).assertEqual(
tru
e);
console.info('testEnable03 END');
done();
});
...
...
@@ -130,8 +102,36 @@ export default function enableJsunit() {
let strJsonNew = getInspectorByKey('enabled');
let objNew = JSON.parse(strJsonNew);
console.info("testEnable04 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.enabled).assertEqual(
fals
e);
expect(objNew.$attrs.enabled).assertEqual(
tru
e);
done();
});
it('testEnable02', 0, async function (done) {
console.info('[testEnable02] START');
try {
var eventData = {
data: {
"enabled": false,
"text": "disable"
}
}
var innerEvent = {
eventId: 93,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEnable02] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEnable02] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('enabled');
let obj = JSON.parse(strJson);
console.info("[testEnable02] obj is: " + JSON.stringify(obj.$attrs.enabled));
expect(obj.$attrs.enabled).assertEqual(false);
console.info('testEnable02 END');
done();
});
})
}
arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets
浏览文件 @
6b6fc67f
...
...
@@ -65,8 +65,8 @@ export default function swiperJsunit() {
let obj = JSON.parse(strJson);
console.info("swiperTest_0200 component obj is: " + JSON.stringify(obj));
let assertObjet = obj.$attrs.indicator;
expect(assertObjet).assert
True();
expect(obj.$attrs.loop).assert
False(
);
expect(assertObjet).assert
Equal('true')
expect(obj.$attrs.loop).assert
Equal('false'
);
console.info('swiperTest_0200 END');
done();
});
...
...
@@ -128,7 +128,7 @@ export default function swiperJsunit() {
let strJsonNew = getInspectorByKey('swiper');
let objNew = JSON.parse(strJsonNew);
console.info("swiperTest_0600 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.index).assertEqual('
4
');
expect(objNew.$attrs.index).assertEqual('
3
');
console.info('swiperTest_0600 END');
done();
});
...
...
@@ -338,8 +338,8 @@ export default function swiperJsunit() {
let strJsonNew = getInspectorByKey('swiper');
let objNew = JSON.parse(strJsonNew);
console.info("swiperTest_1400 component objNew is: " + JSON.stringify(objNew));
let assertObjet = obj.$attrs.indicator;
expect(assertObjet).assert
True(
);
let assertObjet = obj
New
.$attrs.indicator;
expect(assertObjet).assert
Equal('false'
);
console.info('swiperTest_1400 END');
done();
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list.ets
浏览文件 @
6b6fc67f
...
...
@@ -97,7 +97,7 @@ struct ListLanes {
.editMode(true)
.alignListItem(ListItemAlign.Start)
.border({ width: 3, color: Color.Red })
.lanes(
{ minLength: 40, maxLength: 60 }
)
.lanes(
4
)
.onScrollFrameBegin((offset: number, state: ScrollState) => {
if ((this.listPosition == 0 && offset >= 0) || (this.listPosition == 2 && offset <= 0)) {
this.scroller.scrollBy(0, -offset)
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/listTest.test.ets
浏览文件 @
6b6fc67f
...
...
@@ -126,7 +126,7 @@ export default function listNewJsunit() {
console.info("[testListNe0006] component lanes strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('List');
expect(obj.$attrs.lanes).assertEqual('
0
');
expect(obj.$attrs.lanes).assertEqual('
4
');
console.info("[testListNe0006] lanes value :" + obj.$attrs.lanes);
done();
});
...
...
@@ -143,7 +143,7 @@ export default function listNewJsunit() {
console.info("[testListNe0006] component lanes strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('List');
expect(obj.$attrs.lanes).assertEqual('
0
');
expect(obj.$attrs.lanes).assertEqual('
4
');
console.info("[testListNe0006] lanes value :" + obj.$attrs.lanes);
done();
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets
浏览文件 @
6b6fc67f
...
...
@@ -58,7 +58,7 @@ export default function list_itemOnSelectJsunit() {
console.info("[testlist_itemOnSelect0001] component border strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('ListItem');
expect(obj.$attrs.editable).assert
Equal("true"
);
expect(obj.$attrs.editable).assert
True(
);
console.info("[testlist_itemOnSelect0001] editable value :" + obj.$attrs.editable);
done();
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/polyLine.test.ets
浏览文件 @
6b6fc67f
...
...
@@ -56,7 +56,7 @@ export default function polyLineNeJsunit() {
let strJson = getInspectorByKey('Polyline');
console.info("[testpolyLineNe0001] component width strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('
Shap
e');
expect(obj.$type).assertEqual('
Polylin
e');
expect(obj.$attrs.width).assertEqual("100.00px");
console.info("[testpolyLineNe0001] width value :" + obj.$attrs.width);
done();
...
...
@@ -73,7 +73,7 @@ export default function polyLineNeJsunit() {
let strJson = getInspectorByKey('Polyline');
console.info("[testpolyLineNe0002] component height strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('
Shap
e');
expect(obj.$type).assertEqual('
Polylin
e');
expect(obj.$attrs.height).assertEqual("100.00px");
console.info("[testpolyLineNe0002] height value :" + obj.$attrs.height);
done();
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets
浏览文件 @
6b6fc67f
...
...
@@ -143,9 +143,7 @@ export default function swiperCurveJsunit() {
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
let testObj = obj.$attrs.indicator;
console.info("curve006_" + testObj);
expect(testObj).assertTrue();
console.info("[testswiperCurve0006] indicator value :" + obj.$attrs.indicator);
expect(testObj).assertEqual('true');
done();
});
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/swiper.test.ets
浏览文件 @
6b6fc67f
...
...
@@ -58,8 +58,7 @@ export default function swiperMaskJsunit() {
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
console.info("[testswiperMask001] indicatorStyle value :" + obj.$attrs.indicator);
let jsonObject = JSON.parse(obj.$attrs.indicator);
expect(jsonObject.mask).assertEqual('true');
expect(obj.$attrs.indicator).assertEqual('true');
done();
});
})
...
...
arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/select.ets
浏览文件 @
6b6fc67f
// @ts-nocheck
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
@@ -18,7 +17,7 @@ import events_emitter from '@ohos.events.emitter'
@Entry
@Component
struct SliderExample {
@State value:string=
10
@State value:string=
'10'
@State font:object={size: 30, weight:400, family: 'serif', style: FontStyle.Normal }
@State fontColor: Color= 0xCCCCCC
...
...
@@ -60,7 +59,7 @@ struct SliderExample {
.selectedOptionFont({size: 40, weight: 500, family: 'serif', style: FontStyle.Normal })
.optionFont({size: 30, weight: 400, family: 'serif', style: FontStyle.Normal })
.key('select')
.onSelect
ed
((index:number)=>{
.onSelect((index:number)=>{
console.info("Select:" + index)
})
}
...
...
arkui/ace_ets_standard/entry/src/main/ets/test/DividerJsunit.test.ets
浏览文件 @
6b6fc67f
...
...
@@ -72,7 +72,7 @@ export default function dividerJsunit() {
console.log("cd divider strokeWidth" + JSON.stringify(obj.$attrs.strokeWidth));
console.log("cd divider vertical" + JSON.stringify(obj.$attrs.vertical));
console.log("cd divider lineCap" + JSON.stringify(obj.$attrs.lineCap));
expect(obj.$attrs.strokeWidth).assertEqual("7.00
0000
")
expect(obj.$attrs.strokeWidth).assertEqual("7.00
vp
")
expect(obj.$attrs.vertical).assertEqual('true')
expect(obj.$attrs.lineCap == LineCapStyle.Square)
console.info('cd dividerInspectorByKey END');
...
...
arkui/ace_standard/Test.json
浏览文件 @
6b6fc67f
...
...
@@ -17,7 +17,6 @@
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"hilog -Q pidoff"
,
"power-shell wakeup"
,
"power-shell setmode 602"
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录