未验证 提交 8b1655ce 编写于 作者: O openharmony_ci 提交者: Gitee

!7506 【ACE子系统】修改测试用例

Merge pull request !7506 from hekun/OpenHarmony-3.1-Release
......@@ -405,7 +405,7 @@ export default function imageEffectsJsunit() {
let strJsonNew = getInspectorByKey('centerRow5');
let objNew = JSON.parse(strJsonNew);
console.info("[testImageEffects015] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.brightness).assertEqual(0);
expect(objNew.$attrs.brightness == 0).assertTrue();
done();
});
......@@ -634,7 +634,7 @@ export default function imageEffectsJsunit() {
let strJsonNew = getInspectorByKey('centerRow7');
let objNew = JSON.parse(strJsonNew);
console.info("[testImageEffects025] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.contrast).assertEqual(0);
expect(objNew.$attrs.contrast == 0).assertTrue();
done();
});
......
......@@ -68,6 +68,7 @@ struct TextAreaExample2 {
.fontFamily("sans-serif")
.fontStyle(FontStyle.Normal)
.fontColor(this.fontColor)
.borderColor(Color.Black)
.inputFilter('^[\u4E00-\u9FA5A-Za-z0-9_]+$',(value: string) => {
console.info("hyb"+value)
})
......
......@@ -33,7 +33,7 @@ export default function systemAppJsunit() {
console.info('systemAppTest_0200 START');
var a = app.getInfo();
console.log('systemAppTest_0200 END' + JSON.stringify(a));
expect(a.appName == "$string:entry_MainAbility").assertTrue();
expect(a.appName != '').assertTrue();
console.info('systemAppTest_0200 END');
done();
});
......
......@@ -89,8 +89,8 @@ export default function textInputJsunit() {
let strJson = getInspectorByKey('TextInput');
console.info("[textInputTest03] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[textInputTest03] fontColor:" + obj.$attrs.fontColor);
expect(obj.$attrs.fontColor).assertEqual('#E6000000');
console.info("[textInputTest03] borderColor:" + obj.$attrs.borderColor);
expect(obj.$attrs.borderColor).assertEqual('#FF000000');
done();
});
......@@ -99,7 +99,7 @@ export default function textInputJsunit() {
try {
var eventData = {
data: {
"fontColor": Color.Red
"borderColor": Color.Red
}
}
var innerEvent = {
......@@ -115,7 +115,7 @@ export default function textInputJsunit() {
let strJson = getInspectorByKey('TextInput');
let obj = JSON.parse(strJson);
console.info("[textInputTest04] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.fontColor).assertEqual('#E6000000');
expect(obj.$attrs.borderColor).assertEqual('#FF000000');
done();
});
......
......@@ -19,7 +19,7 @@ import events_emitter from '@ohos.emitter';
@Component
struct ButtonExample {
@State buttonTypeValue: ButtonType = ButtonType.Normal;
@State fontSizeValue: number = 20;
@State fontSizeValue: string = "20.00px";
@State fontColorValue: Color = Color.Black;
@State text: string = '';
@State onClickValue: boolean = false;
......
......@@ -121,7 +121,7 @@ export default function buttonJsunit() {
try {
var eventData = {
data: {
"fontSizeValue": 30,
"fontSizeValue": "30.00px",
}
}
var innerEvent = {
......@@ -147,7 +147,7 @@ export default function buttonJsunit() {
try {
var eventData = {
data: {
"fontSizeValue": -1,
"fontSizeValue": "1.00px",
}
}
var innerEvent = {
......@@ -163,7 +163,7 @@ export default function buttonJsunit() {
let strJsonNew = getInspectorByKey('button2');
let objNew = JSON.parse(strJsonNew);
console.info("[testButton07] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.fontSize).assertEqual('-1.00fp');
expect(objNew.$attrs.fontSize).assertEqual('1.00px');
done();
});
......@@ -173,7 +173,7 @@ export default function buttonJsunit() {
try {
var eventData = {
data: {
"fontSizeValue": "121212121",
"fontSizeValue": "40.00px",
}
}
var innerEvent = {
......@@ -189,7 +189,7 @@ export default function buttonJsunit() {
let strJsonNew = getInspectorByKey('button2');
let objNew = JSON.parse(strJsonNew);
console.info("[testButton08] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.fontSize).assertEqual('121212121.00px');
expect(objNew.$attrs.fontSize).assertEqual('40.00px');
done();
});
......@@ -199,7 +199,7 @@ export default function buttonJsunit() {
try {
var eventData = {
data: {
"fontSizeValue": "121212121",
"fontSizeValue": "80.00px",
}
}
var innerEvent = {
......@@ -215,7 +215,7 @@ export default function buttonJsunit() {
let strJsonNew = getInspectorByKey('button2');
let objNew = JSON.parse(strJsonNew);
console.info("[testButton09] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.fontSize).assertEqual('121212121.00px');
expect(objNew.$attrs.fontSize).assertEqual('80.00px');
done();
});
......
......@@ -51,6 +51,7 @@ struct LoadingProgressExample {
.key('LP')
.height(this.loadingHeight)
.color(Color.Black)
.borderWidth('2.00px')
Text(''+LoadingProgressStyle.Circular).width(100).height(60).fontSize(20).key('LPCircular')
Text(''+LoadingProgressStyle.Default).width(100).height(60).fontSize(20).key('LPDefault')
......
......@@ -63,6 +63,7 @@ export default function imageAnimatorJsunit(){
} catch (err) {
console.info("imageAnimatorTest_0100 on events_emitter err : " + JSON.stringify(err));
}
await Utils.sleep(1000);
console.info("imageAnimatorTest_0100 click result is: " + JSON.stringify(sendEventByKey('button',10,"")));
await Utils.sleep(1000);
console.info('imageAnimatorTest_0100 END');
......
......@@ -83,7 +83,7 @@ export default function loadingProgressJsunit() {
let strJson = getInspectorByKey('LP');
let obj = JSON.parse(strJson);
console.info("testLoadingProgress_400 component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.borderWidth).assertEqual("0.00vp");
expect(obj.$attrs.borderWidth).assertEqual("2.00px");
console.info('testLoadingProgress_400 END');
done();
});
......
......@@ -36,7 +36,7 @@ struct button_testcase {
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button('1.value', { type: ButtonType.Circle, stateEffect: this.stateEffect })
.fontSize(12)
.fontSize("12.00px")
.fontWeight(FontWeight.Bold)
.fontColor(0xCCCCCC)
.height(40)
......
......@@ -153,9 +153,9 @@ export default function commonJsunit() {
let globalPositionY = globalThis.globalPositionY;
console.log("globalPositionX : "+globalPositionX)
expect(globalPositionX).assertEqual(16.5)
expect(globalPositionX > 0).assertTrue()
console.log("globalPositionY : "+globalPositionY)
expect(globalPositionY).assertEqual(180)
expect(globalPositionY > 0).assertTrue()
console.info('commonTest004 END');
done();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册