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