Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c2d7ebed
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看板
未验证
提交
c2d7ebed
编写于
3月 08, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 08, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7845 【ACE子系统】修改测试用例
Merge pull request !7845 from hekun/monthly_20221018
上级
c76403dd
a47d12ee
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
61 addition
and
38 deletion
+61
-38
arkui/ace_ets_component_apilack/entry/src/main/ets/test/scroll.test.ets
...component_apilack/entry/src/main/ets/test/scroll.test.ets
+1
-1
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/app.test.ets
...s_component_attrlack/entry/src/main/ets/test/app.test.ets
+1
-1
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/units.test.ets
...component_attrlack/entry/src/main/ets/test/units.test.ets
+1
-1
arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/ohosMatrix4.ets
...five/entry/src/main/ets/MainAbility/pages/ohosMatrix4.ets
+15
-15
arkui/ace_ets_component_five/entry/src/main/ets/test/OhosMatrix4Jsunit.test.ets
...t_five/entry/src/main/ets/test/OhosMatrix4Jsunit.test.ets
+1
-3
arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/QrCode.ets
...ent_three/entry/src/main/ets/MainAbility/pages/QrCode.ets
+4
-4
arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/button.ets
...ent_three/entry/src/main/ets/MainAbility/pages/button.ets
+26
-1
arkui/ace_ets_component_three/entry/src/main/ets/test/ButtonJsunit.test.ets
...onent_three/entry/src/main/ets/test/ButtonJsunit.test.ets
+9
-9
arkui/ace_ets_component_three/entry/src/main/ets/test/ScrollCodeJsunit.test.ets
...t_three/entry/src/main/ets/test/ScrollCodeJsunit.test.ets
+2
-2
arkui/ace_ets_component_three/entry/src/main/ets/test/TimeStampJsunit.test.ets
...nt_three/entry/src/main/ets/test/TimeStampJsunit.test.ets
+1
-1
未找到文件。
arkui/ace_ets_component_apilack/entry/src/main/ets/test/scroll.test.ets
浏览文件 @
c2d7ebed
...
...
@@ -126,7 +126,7 @@ export default function scrollOnScrollBeginJsunit() {
console.info("[testscrollOnScrollBegin0005] component align strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Scroll');
expect(obj.$attrs.scrollBarWidth).assertEqual("30.00
px
");
expect(obj.$attrs.scrollBarWidth).assertEqual("30.00
vp
");
console.info("[testscrollOnScrollBegin0005] scrollBarWidth value :" + obj.$attrs.scrollBarWidth);
done();
});
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/app.test.ets
浏览文件 @
c2d7ebed
...
...
@@ -56,7 +56,7 @@ export default function appVersionCodeJsunit() {
}
var callback = (eventData) => {
console.info("testappVersionCode_0011 get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.Code).assertEqual(
"1"
);
expect(eventData.data.Code).assertEqual(
1000000
);
}
console.info("testappVersion click result is: " + JSON.stringify(sendEventByKey('versionCodeText', 10, "")));
events_emitter.on(innerEvent, callback);
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/units.test.ets
浏览文件 @
c2d7ebed
...
...
@@ -62,7 +62,7 @@ export default function unitsModuleNameJsunit() {
}
var callback = (eventData) => {
console.info("testunitsModuleName0001 get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.ModuleName).assert
Equal(true
);
expect(eventData.data.ModuleName).assert
False(
);
}
events_emitter.on(innerEvent, callback);
} catch (err) {
...
...
arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/ohosMatrix4.ets
浏览文件 @
c2d7ebed
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
@@ -20,36 +20,36 @@ import prompt from '@system.prompt'
@Entry
@Component
struct ohosMatrix4 {
@State rotateValue:
object
= {
@State rotateValue:
RotateOptions
= {
x: 1,
y: 1,
z: 1,
centerX:
'50%'
,
centerY:
'50%'
,
centerX:
7
,
centerY:
8
,
angle: 300
}
@State translateValue: object= { x: 100, y: 5 }
@State scaleValue: object= { x: 2, y: 0.5 }
@State transformValue: object= Matrix4.identity().translate({ x: 100, y: 100, z: 30 })
@State transformValue: object= Matrix4.identity().translate({ x: 100, y: 100, z: 30 })
@State transformValue
1
: object= Matrix4.identity().translate({ x: 100, y: 100, z: 30 })
@State matrix1: object= Matrix4.identity().transformPoint([100, 10])
@State matrix2:
objec
t = Matrix4.identity().translate({ x: 300 }).copy()
@State matrix3:
object
= Matrix4.identity().scale({ x: 3 }).copy()
@State matrix2:
Matrix4.Matrix4Transi
t = Matrix4.identity().translate({ x: 300 }).copy()
@State matrix3:
Matrix4.Matrix4Transit
= Matrix4.identity().scale({ x: 3 }).copy()
@State matrix4: object = Matrix4.identity().rotate({x:1, y:1, z:2, angle:30})
@State matrix5: object = Matrix4.identity().scale({x:5, y:1, z:1, centerX:50, centerY:50})
@State matrix6: object = Matrix4.identity().translate({x:100, y:200, z:30})
@State matrix7: Matrix4.Matrix4Transit = Matrix4.identity().translate({ x: 300 }).combine(Matrix4.identity().scale({ x: 3 }));
@State onClickValue:boolean = false;
private stateChangCallBack = (eventData) => {
console.info("transFormExample page state change called:" + JSON.stringify(eventData));
if (eventData != null) {
console.info("eventData value is");
if (eventData.data.matrix2 != null && eventData.data.matrix3 != null) {
console.info("this.matrix2 value is" + Matrix4.identity()
.translate(eventData.data.matrix2)
.copy() + "2" + JSON.stringify(Matrix4.identity().translate(eventData.data.matrix2).copy()));
this.matrix2 = Matrix4.identity().translate(eventData.data.matrix2).copy();
console.info("this.matrix3 value is");
this.matrix3 = Matrix4.identity().scale(eventData.data.matrix3).copy();
let matrixV = Matrix4.identity().translate(eventData.data.matrix2);
if (matrixV != null) {
this.matrix2 = Matrix4.identity().translate(eventData.data.matrix2).copy();
this.matrix3 = Matrix4.identity().scale(eventData.data.matrix3).copy();
}
} else {
console.info("this.matrix value is not");
}
...
...
@@ -129,7 +129,7 @@ struct ohosMatrix4 {
}).backgroundColor(0x2788D9).key('rotate5')
Image('/images/bg.jpg')
.padding(5)
.transform(this.matrix
2.combine(this.matrix3)
)
.transform(this.matrix
7
)
.width("40%")
.height(100)
.margin({ top: 5 })
...
...
arkui/ace_ets_component_five/entry/src/main/ets/test/OhosMatrix4Jsunit.test.ets
浏览文件 @
c2d7ebed
...
...
@@ -169,9 +169,7 @@ export default function ohosMatrix4Jsunit() {
let objNew = JSON.parse(strJsonNew);
console.info("[test_OhosMatrix4_006] component objNew is: " + JSON.stringify(objNew));
console.info("[test_OhosMatrix4_006] component transform is: " + JSON.stringify(objNew.$attrs.transform));
expect(JSON.stringify(objNew.$attrs.transform)).assertEqual('{"type":"matrix",' +
'"matrix":"0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,' +
'0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,0.000000,"}');
expect(JSON.stringify(objNew.$attrs.transform)).assertEqual('{"type":"matrix","matrix":"3.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,900.000000,0.000000,0.000000,1.000000,"}');
done();
});
})
...
...
arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/QrCode.ets
浏览文件 @
c2d7ebed
...
...
@@ -28,9 +28,9 @@ struct QrCode {
var colorValue = eventData.data.color;
if (colorValue != null && colorValue.length != 0) {
this.qrCodeColor = colorValue;
console.info("qrCodeColor:" + qrCodeColor);
console.info("qrCodeColor:" +
this.
qrCodeColor);
} else {
console.info("qrCodeColor is null or empty " + qrCodeColor);
console.info("qrCodeColor is null or empty " +
this.
qrCodeColor);
}
} else {
console.info("qrCode page color not change called:" + JSON.stringify(eventData));
...
...
@@ -42,9 +42,9 @@ struct QrCode {
var backgroundColorValue = eventData.data.backgroundColor;
if (backgroundColorValue != null && backgroundColorValue.length != 0) {
this.qrCodeBackgroundColor = backgroundColorValue;
console.info("qrCodeBackgroundColor:" + qrCodeBackgroundColor);
console.info("qrCodeBackgroundColor:" +
this.
qrCodeBackgroundColor);
} else {
console.info("backgroundColorValue is null or empty " + qrCodeColor);
console.info("backgroundColorValue is null or empty " +
this.
qrCodeColor);
}
} else {
console.info("qrCode page backgroundColorValue not change called:" + JSON.stringify(eventData));
...
...
arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/button.ets
浏览文件 @
c2d7ebed
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
@@ -92,6 +92,31 @@ struct ButtonExample {
console.info("button2 emit action state err: " + JSON.stringify(err.message))
}
})
Button('ok2')
.type(this.buttonTypeValue)
.key('buttontest')
.fontSize(this.fontSizeValue)
.backgroundColor(0x317aff)
.width(90)
.fontColor(this.fontColorValue)
.onClick(() => {
try {
var backData = {
data: {
"fontColorValue": this.fontColorValue,
}
}
var backEvent = {
eventId: 9907,
priority: events_emitter.EventPriority.LOW
}
console.info("buttontest start to emit action state")
events_emitter.emit(backEvent, backData)
} catch (err) {
console.info("buttontest emit action state err: " + JSON.stringify(err.message))
}
})
Button('ok!')
.type(this.buttonTypeValue)
.key('button3')
...
...
arkui/ace_ets_component_three/entry/src/main/ets/test/ButtonJsunit.test.ets
浏览文件 @
c2d7ebed
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
@@ -243,7 +243,7 @@ export default function buttonJsunit() {
}
let callback = (indexEvent) => {
console.info("testButton10 get state result is: " + JSON.stringify(indexEvent))
ex
cep
t(indexEvent.data.fontColorValue).assertEqual(Color.Pink)
ex
pec
t(indexEvent.data.fontColorValue).assertEqual(Color.Pink)
}
try {
events_emitter.on(indexEvent, callback);
...
...
@@ -280,7 +280,7 @@ export default function buttonJsunit() {
}
let callback = (indexEvent) => {
console.info("testButton11 get state result is: " + JSON.stringify(indexEvent))
ex
cep
t(indexEvent.data.fontColorValue).assertEqual(332)
ex
pec
t(indexEvent.data.fontColorValue).assertEqual(332)
}
try {
events_emitter.on(indexEvent, callback);
...
...
@@ -327,7 +327,7 @@ export default function buttonJsunit() {
try {
var eventData = {
data: {
"buttonTypeValue":
qaq
,
"buttonTypeValue":
"qaq"
,
}
}
var innerEvent = {
...
...
@@ -378,7 +378,7 @@ export default function buttonJsunit() {
try {
let eventData = {
data: {
"fontColorValue":
ab996
"fontColorValue":
"ab996"
}
}
let indexEventOne = {
...
...
@@ -390,21 +390,21 @@ export default function buttonJsunit() {
} catch (err) {
console.log("testButton15 change component data error: " + err.message);
}
await Utils.sleep(
1
000);
await Utils.sleep(
2
000);
let indexEvent = {
eventId:
7
7,
eventId:
990
7,
priority: events_emitter.EventPriority.LOW
}
let callback = (indexEvent) => {
console.info("testButton15 get state result is: " + JSON.stringify(indexEvent))
ex
cept(indexEvent.data.fontColorValue).assertEqual('ab996'
)
ex
pect(indexEvent.data.fontColorValue).assertEqual("ab996"
)
}
try {
events_emitter.on(indexEvent, callback);
} catch (err) {
console.info("testButton15 on events_emitter err : " + JSON.stringify(err));
}
console.info("testButton15 click result is: " + JSON.stringify(sendEventByKey('button
4
', 10, "")));
console.info("testButton15 click result is: " + JSON.stringify(sendEventByKey('button
test
', 10, "")));
await Utils.sleep(1000);
console.info('[testButton15] END');
done();
...
...
arkui/ace_ets_component_three/entry/src/main/ets/test/ScrollCodeJsunit.test.ets
浏览文件 @
c2d7ebed
...
...
@@ -55,7 +55,7 @@ export default function scrollCodeJsunit() {
expect(obj.$attrs.scrollable).assertEqual('ScrollDirection.Vertical');
expect(obj.$attrs.scrollBar).assertEqual('BarState.On');
expect(obj.$attrs.scrollBarColor).assertEqual('#FF0000FF');
expect(obj.$attrs.scrollBarWidth).assertEqual('30.00
px
');
expect(obj.$attrs.scrollBarWidth).assertEqual('30.00
vp
');
done();
});
...
...
@@ -159,7 +159,7 @@ export default function scrollCodeJsunit() {
let strJson = getInspectorByKey('ScrollCode');
let obj = JSON.parse(strJson);
console.info("[test_scrollCode_005] component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.scrollBarWidth).assertEqual('40.00
px
');
expect(obj.$attrs.scrollBarWidth).assertEqual('40.00
vp
');
done();
});
...
...
arkui/ace_ets_component_three/entry/src/main/ets/test/TimeStampJsunit.test.ets
浏览文件 @
c2d7ebed
...
...
@@ -50,7 +50,7 @@ export default function timeStampJsunit() {
await Utils.sleep(1500);
let callback = (indexEvent) => {
console.info("timeStampTest_0100 get state result is: " + JSON.stringify(indexEvent));
expect(i
ndexEvent.data.Text).assertNotEqual(null
);
expect(i
sNaN(indexEvent.data.Text)).assertFalse(
);
}
let indexEvent = {
eventId: 230,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录