Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f8631e14
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看板
未验证
提交
f8631e14
编写于
5月 24, 2023
作者:
O
openharmony_ci
提交者:
Gitee
5月 24, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8733 适配Three和UI测试套测试用例
Merge pull request !8733 from 王旭鹏/master
上级
2ab26d05
ec8b0dfc
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
74 addition
and
21 deletion
+74
-21
arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/shape.ets
...nent_three/entry/src/main/ets/MainAbility/pages/shape.ets
+1
-1
arkui/ace_ets_component_three/entry/src/main/ets/test/ShapeJsunit.test.ets
...ponent_three/entry/src/main/ets/test/ShapeJsunit.test.ets
+56
-4
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/slider.ets
...ponent_ui/entry/src/main/ets/MainAbility/pages/slider.ets
+3
-2
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/stepper.ets
...onent_ui/entry/src/main/ets/MainAbility/pages/stepper.ets
+2
-2
arkui/ace_ets_component_ui/entry/src/main/ets/test/GridJsunit.test.ets
..._component_ui/entry/src/main/ets/test/GridJsunit.test.ets
+10
-10
arkui/ace_ets_component_ui/entry/src/main/ets/test/TextInputJsunit.test.ets
...onent_ui/entry/src/main/ets/test/TextInputJsunit.test.ets
+1
-1
arkui/ace_ets_component_ui/entry/src/main/ets/test/sliderJsunit.test.ets
...omponent_ui/entry/src/main/ets/test/sliderJsunit.test.ets
+1
-1
未找到文件。
arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/shape.ets
浏览文件 @
f8631e14
...
@@ -41,7 +41,7 @@ struct ShapeExample {
...
@@ -41,7 +41,7 @@ struct ShapeExample {
this.strokeLineJoin = eventData.data.strokeLineJoin;
this.strokeLineJoin = eventData.data.strokeLineJoin;
}
}
if (eventData.data.strokeMiterLimit != null) {
if (eventData.data.strokeMiterLimit != null) {
this.strokeMiterLimit =
parseInt(eventData.data.strokeMiterLimit)
;
this.strokeMiterLimit =
eventData.data.strokeMiterLimit
;
}
}
if (eventData.data.strokeOpacity != null) {
if (eventData.data.strokeOpacity != null) {
this.strokeOpacity = parseInt(eventData.data.strokeOpacity);
this.strokeOpacity = parseInt(eventData.data.strokeOpacity);
...
...
arkui/ace_ets_component_three/entry/src/main/ets/test/ShapeJsunit.test.ets
浏览文件 @
f8631e14
...
@@ -400,7 +400,59 @@ export default function shapeJsunit() {
...
@@ -400,7 +400,59 @@ export default function shapeJsunit() {
var strJson = getInspectorByKey('shape');
var strJson = getInspectorByKey('shape');
var obj = JSON.parse(strJson);
var obj = JSON.parse(strJson);
console.info("shapeTest_2100 component obj is: " + JSON.stringify(obj.$attrs.strokeMiterLimit));
console.info("shapeTest_2100 component obj is: " + JSON.stringify(obj.$attrs.strokeMiterLimit));
expect(obj.$attrs.strokeMiterLimit).assertEqual('4.000000');
expect(parseInt(obj.$attrs.strokeMiterLimit)).assertEqual(4);
done();
});
it('shapeTest_3200', 0, async function (done) {
console.info('shapeTest_3200 START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"strokeMiterLimit": 1,
}
}
var innerEvent = {
eventId: 192,
priority: events_emitter.EventPriority.LOW
}
console.info("shapeTest_3200 start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("shapeTest_3200 change component color error: " + err.message);
}
await Utils.sleep(2000);
var strJson = getInspectorByKey('shape');
var obj = JSON.parse(strJson);
console.info("shapeTest_3200 component obj is: " + JSON.stringify(obj.$attrs.strokeMiterLimit));
expect(parseInt(obj.$attrs.strokeMiterLimit)).assertEqual(1);
done();
});
it('shapeTest_3300', 0, async function (done) {
console.info('shapeTest_3300 START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"strokeMiterLimit": 0.5,
}
}
var innerEvent = {
eventId: 192,
priority: events_emitter.EventPriority.LOW
}
console.info("shapeTest_3300 start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("shapeTest_3300 change component color error: " + err.message);
}
await Utils.sleep(2000);
var strJson = getInspectorByKey('shape');
var obj = JSON.parse(strJson);
console.info("shapeTest_3300 component obj is: " + JSON.stringify(obj.$attrs.strokeMiterLimit));
expect(parseInt(obj.$attrs.strokeMiterLimit)).assertEqual(1);
done();
done();
});
});
...
@@ -410,7 +462,7 @@ export default function shapeJsunit() {
...
@@ -410,7 +462,7 @@ export default function shapeJsunit() {
try {
try {
var eventData = {
var eventData = {
data: {
data: {
"strokeMiterLimit": '
aaa
11111',
"strokeMiterLimit": '11111',
}
}
}
}
var innerEvent = {
var innerEvent = {
...
@@ -426,7 +478,7 @@ export default function shapeJsunit() {
...
@@ -426,7 +478,7 @@ export default function shapeJsunit() {
var strJson = getInspectorByKey('shape');
var strJson = getInspectorByKey('shape');
var obj = JSON.parse(strJson);
var obj = JSON.parse(strJson);
console.info("shapeTest_2200 component obj is: " + JSON.stringify(obj.$attrs.strokeMiterLimit));
console.info("shapeTest_2200 component obj is: " + JSON.stringify(obj.$attrs.strokeMiterLimit));
expect(
obj.$attrs.strokeMiterLimit).assertEqual('4.000000'
);
expect(
parseInt(obj.$attrs.strokeMiterLimit)).assertEqual(11111
);
done();
done();
});
});
...
@@ -478,7 +530,7 @@ export default function shapeJsunit() {
...
@@ -478,7 +530,7 @@ export default function shapeJsunit() {
var strJson = getInspectorByKey('shape');
var strJson = getInspectorByKey('shape');
var obj = JSON.parse(strJson);
var obj = JSON.parse(strJson);
console.info("shapeTest_2000 component obj is: " + JSON.stringify(obj.$attrs.strokeMiterLimit));
console.info("shapeTest_2000 component obj is: " + JSON.stringify(obj.$attrs.strokeMiterLimit));
expect(obj.$attrs.strokeMiterLimit).assertEqual('
5
.000000');
expect(obj.$attrs.strokeMiterLimit).assertEqual('
4
.000000');
done();
done();
});
});
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/slider.ets
浏览文件 @
f8631e14
...
@@ -29,6 +29,7 @@ struct SliderExample {
...
@@ -29,6 +29,7 @@ struct SliderExample {
@State inSetValueTwo: number = 40
@State inSetValueTwo: number = 40
@State vOutSetValueOne: number = 40
@State vOutSetValueOne: number = 40
@State vInSetValueOne: number = 40
@State vInSetValueOne: number = 40
@State vInSetValueOne1: number = 40
@State vOutSetValueTwo: number = 40
@State vOutSetValueTwo: number = 40
@State vInSetValueTwo: number = 40
@State vInSetValueTwo: number = 40
@State blockColor: string = "#191970"
@State blockColor: string = "#191970"
...
@@ -205,7 +206,7 @@ struct SliderExample {
...
@@ -205,7 +206,7 @@ struct SliderExample {
Text(this.modeT).fontSize(9).fontColor(0xCCCCCC).width('50%').margin(15).key('modeT')
Text(this.modeT).fontSize(9).fontColor(0xCCCCCC).width('50%').margin(15).key('modeT')
Row() {
Row() {
Slider({
Slider({
value: this.vInSetValueOne,
value: this.vInSetValueOne
1
,
style: this.style,
style: this.style,
direction: this.directionT,
direction: this.directionT,
reverse: this.reverse,// 竖向的Slider默认是上端是min值,下端是max值,因此想要从下往上滑动,需要设置reverse为true
reverse: this.reverse,// 竖向的Slider默认是上端是min值,下端是max值,因此想要从下往上滑动,需要设置reverse为true
...
@@ -214,7 +215,7 @@ struct SliderExample {
...
@@ -214,7 +215,7 @@ struct SliderExample {
step:this.step
step:this.step
}).showTips(true)
}).showTips(true)
.onChange((value: number, mode: SliderChangeMode) => {
.onChange((value: number, mode: SliderChangeMode) => {
this.vInSetValueOne = value
this.vInSetValueOne
1
= value
console.info('value:' + value + 'm`ode:' + mode.toString())
console.info('value:' + value + 'm`ode:' + mode.toString())
}).key('sliderConstructor')
}).key('sliderConstructor')
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/stepper.ets
浏览文件 @
f8631e14
...
@@ -103,7 +103,7 @@ struct StepperExample {
...
@@ -103,7 +103,7 @@ struct StepperExample {
// 第三个步骤页
// 第三个步骤页
StepperItem() {
StepperItem() {
Column() {
Column() {
Text('Page Three')
Text('Page Three')
.key('pageThree')
.itemTextStyle()
.itemTextStyle()
Button('change status:' + this.thirdState)
Button('change status:' + this.thirdState)
.backgroundColor('#007dFF')
.backgroundColor('#007dFF')
...
@@ -116,7 +116,7 @@ struct StepperExample {
...
@@ -116,7 +116,7 @@ struct StepperExample {
// 第四个步骤页
// 第四个步骤页
StepperItem() {
StepperItem() {
Column() {
Column() {
Text('Page Four')
Text('Page Four')
.key('pageFour')
.itemTextStyle()
.itemTextStyle()
}.itemStyle()
}.itemStyle()
}
}
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/GridJsunit.test.ets
浏览文件 @
f8631e14
...
@@ -61,7 +61,7 @@ export default function GridJsunit() {
...
@@ -61,7 +61,7 @@ export default function GridJsunit() {
console.info("[GridJsunit_0100] component obj2 is: " + JSON.stringify(obj2));
console.info("[GridJsunit_0100] component obj2 is: " + JSON.stringify(obj2));
expect(obj2.$attrs.scrollBar).assertEqual('BarState.Off');
expect(obj2.$attrs.scrollBar).assertEqual('BarState.Off');
expect(obj2.$attrs.scrollBarColor).assertEqual('#FF808080');
expect(obj2.$attrs.scrollBarColor).assertEqual('#FF808080');
expect(obj2.$attrs.scrollBarWidth).assertEqual('20.00
px
');
expect(obj2.$attrs.scrollBarWidth).assertEqual('20.00
vp
');
console.info('[GridJsunit_0100] END');
console.info('[GridJsunit_0100] END');
done();
done();
});
});
...
@@ -95,7 +95,7 @@ export default function GridJsunit() {
...
@@ -95,7 +95,7 @@ export default function GridJsunit() {
let obj2 = JSON.parse(strJson2);
let obj2 = JSON.parse(strJson2);
console.info("[GridJsunit_0200] component obj2 is: " + JSON.stringify(obj2));
console.info("[GridJsunit_0200] component obj2 is: " + JSON.stringify(obj2));
expect(obj2.$attrs.scrollBarColor).assertEqual('#FF000000');
expect(obj2.$attrs.scrollBarColor).assertEqual('#FF000000');
expect(obj2.$attrs.scrollBarWidth).assertEqual('30.00
px
');
expect(obj2.$attrs.scrollBarWidth).assertEqual('30.00
vp
');
console.info('[GridJsunit_0200] END');
console.info('[GridJsunit_0200] END');
done();
done();
});
});
...
@@ -123,14 +123,14 @@ export default function GridJsunit() {
...
@@ -123,14 +123,14 @@ export default function GridJsunit() {
console.info("[GridJsunit_0300] component obj is: " + JSON.stringify(obj));
console.info("[GridJsunit_0300] component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.columnsGap).assertEqual('0.00vp');
expect(obj.$attrs.columnsGap).assertEqual('0.00vp');
expect(obj.$attrs.rowsGap).assertEqual('0.00vp');
expect(obj.$attrs.rowsGap).assertEqual('0.00vp');
expect(obj.$attrs.cachedCount).assertEqual(
0
);
expect(obj.$attrs.cachedCount).assertEqual(
1
);
await CommonFunc.sleep(1000);
await CommonFunc.sleep(1000);
let strJson2 = getInspectorByKey('grid2');
let strJson2 = getInspectorByKey('grid2');
let obj2 = JSON.parse(strJson2);
let obj2 = JSON.parse(strJson2);
console.info("[GridJsunit_0300] component obj2 is: " + JSON.stringify(obj2));
console.info("[GridJsunit_0300] component obj2 is: " + JSON.stringify(obj2));
expect(obj2.$attrs.scrollBar).assertEqual('BarState.Off');
expect(obj2.$attrs.scrollBar).assertEqual('BarState.Off');
expect(obj2.$attrs.scrollBarColor).assertEqual('#FF000000');
expect(obj2.$attrs.scrollBarColor).assertEqual('#FF000000');
expect(obj2.$attrs.scrollBarWidth).assertEqual('
-10.00px
');
expect(obj2.$attrs.scrollBarWidth).assertEqual('
4.00vp
');
console.info('[GridJsunit_0300] END');
console.info('[GridJsunit_0300] END');
done();
done();
});
});
...
@@ -224,10 +224,10 @@ export default function GridJsunit() {
...
@@ -224,10 +224,10 @@ export default function GridJsunit() {
globalThis.value.message.notify({name:'rowsTemplate',value:''})
globalThis.value.message.notify({name:'rowsTemplate',value:''})
await CommonFunc.sleep(1000);
await CommonFunc.sleep(1000);
let gridItem1 = CommonFunc.getComponentRect('0');
let gridItem1 = CommonFunc.getComponentRect('0');
let
bottom = gridItem1.bottom
let
left1 = gridItem1.left
let gridItem2 = CommonFunc.getComponentRect('4');
let gridItem2 = CommonFunc.getComponentRect('4');
let
top = gridItem2.top
let
left2 = gridItem2.left
expect(
bottom).assertEqual(top
);
expect(
left1).assertEqual(left2
);
console.info('[GridJsunit_0700] END');
console.info('[GridJsunit_0700] END');
done();
done();
});
});
...
@@ -241,10 +241,10 @@ export default function GridJsunit() {
...
@@ -241,10 +241,10 @@ export default function GridJsunit() {
await CommonFunc.sleep(1000);
await CommonFunc.sleep(1000);
let driver = await UiDriver.create()
let driver = await UiDriver.create()
let gridItem1 = CommonFunc.getComponentRect('0');
let gridItem1 = CommonFunc.getComponentRect('0');
let
right = gridItem1.right
let
top1 = gridItem1.top
let gridItem2 = CommonFunc.getComponentRect('4');
let gridItem2 = CommonFunc.getComponentRect('4');
let
left = gridItem2.left
let
top2 = gridItem2.top
expect(
right).assertEqual(left
);
expect(
top1).assertEqual(parseInt(top2)
);
console.info('[GridJsunit_0800] END');
console.info('[GridJsunit_0800] END');
done();
done();
});
});
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/TextInputJsunit.test.ets
浏览文件 @
f8631e14
...
@@ -267,7 +267,7 @@ export default function TextInputJsunit() {
...
@@ -267,7 +267,7 @@ export default function TextInputJsunit() {
console.info("[TextInputJsunit_0500] textAlign: " + JSON.stringify(obj.$attrs.textAlign));
console.info("[TextInputJsunit_0500] textAlign: " + JSON.stringify(obj.$attrs.textAlign));
expect(obj.$attrs.placeholder).assertEqual('');
expect(obj.$attrs.placeholder).assertEqual('');
expect(obj.$attrs.type).assertEqual('InputType.Normal');
expect(obj.$attrs.type).assertEqual('InputType.Normal');
expect(obj.$attrs.placeholderColor).assertEqual('#FF00
8
000');
expect(obj.$attrs.placeholderColor).assertEqual('#FF00
0
000');
expect(obj.$attrs.placeholderFont).assertEqual('{"style":"FontStyle.Normal","size":"18.00fp","weight":"500","fontFamily":"sans-serif"}');
expect(obj.$attrs.placeholderFont).assertEqual('{"style":"FontStyle.Normal","size":"18.00fp","weight":"500","fontFamily":"sans-serif"}');
expect(obj.$attrs.enterKeyType).assertEqual('EnterKeyType.Done');
expect(obj.$attrs.enterKeyType).assertEqual('EnterKeyType.Done');
expect(obj.$attrs.caretColor).assertEqual('#FF00007B');
expect(obj.$attrs.caretColor).assertEqual('#FF00007B');
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/sliderJsunit.test.ets
浏览文件 @
f8631e14
...
@@ -204,7 +204,7 @@ export default function sliderJsunit() {
...
@@ -204,7 +204,7 @@ export default function sliderJsunit() {
let strJson1 = getInspectorByKey('modeT');
let strJson1 = getInspectorByKey('modeT');
let obj1 = JSON.parse(strJson1);
let obj1 = JSON.parse(strJson1);
console.info("[sliderJsunit_0800] obj1: " + JSON.stringify(obj1));
console.info("[sliderJsunit_0800] obj1: " + JSON.stringify(obj1));
expect(obj1.$attrs.content).assertEqual('
mode
');
expect(obj1.$attrs.content).assertEqual('
2
');
done();
done();
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录