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

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

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