未验证 提交 0247b0e1 编写于 作者: O openharmony_ci 提交者: Gitee

!8233 【ACE子系统】修改失败测试用例

Merge pull request !8233 from hekun/master
......@@ -321,7 +321,7 @@ export default function swiperJsunit() {
try {
let eventData = {
data: {
"indicator": "false"
"indicator": false
}
}
let indexEvent = {
......
......@@ -219,7 +219,7 @@ export default function textStyleJsunit() {
console.info("[testTextStyle008] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testTextStyle008] fontSize: " + obj.$attrs.fontSize);
expect(obj.$attrs.fontSize).assertEqual('-2147483648.00fp');
expect(obj.$attrs.fontSize).assertEqual('16.00fp');
done();
});
......
......@@ -25,7 +25,7 @@ const TAG = 'ets_apiLack_add';
struct Second {
private content: string = "这是第二页"
@State text: string = router.getParams()['text']
@State data: number[] = router.getParams()['data']
@State data: any = router.getParams()['data']
@State secondData : string = ''
build() {
......@@ -37,7 +37,7 @@ struct Second {
.fontSize(30)
.key("SingleDataText")
.onClick(()=>{
this.secondData = (this.data[1]).toString()
this.secondData = (this.data.array[1]).toString()
try {
var backData = {
data: {
......
......@@ -68,7 +68,9 @@ export default function shapeClippingJsunit() {
let strJson = getInspectorByKey('image_mask');
let obj = JSON.parse(strJson);
console.info("[testShapeClipping002] component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.mask.shape).assertEqual('Rect');
console.info("[testShapeClipping002] component mask obj is: " + JSON.stringify(obj.$attrs.mask));
let mask = JSON.parse(JSON.stringify(obj.$attrs.mask));
expect(mask.shape).assertEqual('Rect');
expect(obj.$attrs.clip).assertEqual('false');
console.info('[testShapeClipping002] END');
done();
......@@ -95,7 +97,9 @@ export default function shapeClippingJsunit() {
let strJsonNew = getInspectorByKey('image_mask');
let objNew = JSON.parse(strJsonNew);
console.info("[testShapeClipping003] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.mask.shape).assertEqual('Circle');
console.info("[testShapeClipping003] component mask obj is: " + JSON.stringify(objNew.$attrs.mask));
let mask = JSON.parse(JSON.stringify(objNew.$attrs.mask));
expect(mask.shape).assertEqual('Circle');
console.info('[testShapeClipping003] END');
done();
});
......
......@@ -296,7 +296,7 @@ export default function textJsunit() {
let strJsonNew = getInspectorByKey('text');
let objNew = JSON.parse(strJsonNew);
console.info("testText_1300 component objNew is: " + JSON.stringify(objNew.$attrs.fontSize));
expect(objNew.$attrs.fontSize).assertEqual('nanfp');
expect(objNew.$attrs.fontSize).assertEqual('16.00fp');
console.info('testText_1300 END');
done();
});
......@@ -322,7 +322,7 @@ export default function textJsunit() {
let strJsonNew = getInspectorByKey('text');
let objNew = JSON.parse(strJsonNew);
console.info("testText_1400 component objNew is: " + JSON.stringify(objNew.$attrs.fontSize));
expect(objNew.$attrs.fontSize).assertEqual('-20.00fp');
expect(objNew.$attrs.fontSize).assertEqual('16.00fp');
console.info('testText_1400 END');
done();
});
......
......@@ -22,7 +22,7 @@ struct promptExample {
build(){
Column(){
Button('click')
.key('button')
.key('button_c')
.backgroundColor('#FF0B8FE2')
.fontSize(20)
.margin({top: 20})
......
......@@ -97,7 +97,7 @@ struct ImageAnimatorExample {
console.info('Finish')
})
Row() {
Button('start').key('button').width(100).padding(5).onClick(() => {
Button('start').key('button_0').width(100).padding(5).onClick(() => {
this.state = AnimationStatus.Running
try {
var backData = {
......@@ -106,7 +106,7 @@ struct ImageAnimatorExample {
}
}
var backEvent = {
eventId: 115,
eventId: 1150,
priority: events_emitter.EventPriority.LOW
}
console.info("imageAnimator 115 button start to emit action state")
......
......@@ -62,7 +62,7 @@ export default function transFormJsunit() {
} catch (err) {
console.info("configurationTest_0100 on configurationEvent err : " + JSON.stringify(err));
}
console.info("testAppear01 click result is: " + JSON.stringify(sendEventByKey('button', 10, "")));
console.info("testAppear01 click result is: " + JSON.stringify(sendEventByKey('button_c', 10, "")));
console.info('[configurationTest01] END');
});
})
......
......@@ -56,15 +56,16 @@ export default function imageAnimatorJsunit(){
done();
}
let indexEvent = {
eventId: 115,
eventId: 1150,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(indexEvent, callback);
console.info("imageAnimatorTest_0100 click result is: " + JSON.stringify(sendEventByKey('button',10,"")));
} catch (err) {
console.info("imageAnimatorTest_0100 on events_emitter err : " + JSON.stringify(err));
}
console.info("imageAnimatorTest_0100 click result is: " + JSON.stringify(sendEventByKey('button_0',10,"")));
await Utils.sleep(1000);
console.info('imageAnimatorTest_0100 END');
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册