diff --git a/ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets b/ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets index aae22287169b189836204a3bdfd7db2674e9fce0..cf45f497f537508c1080a0f51bdefe4ca0314bd2 100755 --- a/ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets +++ b/ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets @@ -75,7 +75,7 @@ export default function buttonJsunit() { let strJson = getInspectorByKey('button2'); let obj = JSON.parse(strJson); console.info("[testButton03] component obj is: " + JSON.stringify(obj)); - expect(obj.$attrs.fontSize).assertEqual('20'); + expect(obj.$attrs.fontSize).assertEqual('20.00px'); done(); }); @@ -137,7 +137,7 @@ export default function buttonJsunit() { let strJsonNew = getInspectorByKey('button2'); let objNew = JSON.parse(strJsonNew); console.info("[testButton05] component objNew is: " + JSON.stringify(objNew)); - expect(objNew.$attrs.fontSize).assertEqual('30'); + expect(objNew.$attrs.fontSize).assertEqual('30.00px'); done(); }); @@ -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'); + expect(objNew.$attrs.fontSize).assertEqual('121212121.00px'); done(); }); @@ -199,7 +199,7 @@ export default function buttonJsunit() { try { var eventData = { data: { - "fontSizeValue": "121212121vaas", + "fontSizeValue": "121212121", } } 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'); + expect(objNew.$attrs.fontSize).assertEqual('121212121.00px'); done(); }); diff --git a/ace/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets b/ace/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets index c3f7ca4720bea13ee9377454467a8dbd2d327c8e..b88b3a28122702469977ab5f71ef47d7b9cb757e 100755 --- a/ace/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets +++ b/ace/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets @@ -19,6 +19,7 @@ import events_emitter from '@ohos.emitter'; @Component struct LoadingProgressExample { @State color: color = Color.Blue + @State loadingHeight: string = '50px' private stateChangCallBack = (eventData) => { console.info("LoadingProgress page stateChangCallBack"); @@ -46,8 +47,9 @@ struct LoadingProgressExample { .fontColor(0xCCCCCC) .height(50) .width('90%') - .key('LP') LoadingProgress() + .key('LP') + .height(this.loadingHeight) .color(Color.Black) }.width('100%').margin({ top: 6 }) } diff --git a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets index 88d146f0b6dd77f3018fc7cb46bff2527e2be08f..e03ba6a122d73c37e66eff28cd477dcfe8c100ee 100644 --- a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets +++ b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets @@ -127,7 +127,6 @@ struct text_textcase { .zIndex(this.zIndex) .fontColor(this.fontColor) .fontSize(15) - .minFontSize(15) .maxFontSize(15) .fontWeight(this.fontWeight) .fontStyle(this.fontStyle) diff --git a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets index 32db7d4094d16c08f7e6bed4e519a05fa514922a..33724a133818efa3326a5aab61319b9525206ab9 100644 --- a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets +++ b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets @@ -71,7 +71,7 @@ export default function buttonJsunit() { expect(obj.$attrs.type).assertEqual('ButtonType.Circle') expect(obj.$attrs.stateEffect).assertEqual('true') expect(obj.$attrs.label).assertEqual('1.value') - expect(obj.$attrs.fontSize).assertEqual('12') + expect(obj.$attrs.fontSize).assertEqual('12.00px') console.info('cd buttonInspectorByKey END'); done(); }); diff --git a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets index 87d73d049212544d86001929e1e6898c80c8fceb..7da2851a36b70cc6ac999f24c2ee4d92942fbae7 100644 --- a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets +++ b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets @@ -65,54 +65,6 @@ export default function textJsunit() { let strJson = getInspectorByKey('Text'); let obj = JSON.parse(strJson); console.info("cd text component obj is: " + JSON.stringify(obj)); - console.log("cd text type" + JSON.stringify(obj.$type)); - console.log("cd text height" + JSON.stringify(obj.$attrs.height)); - console.log("cd text width" + JSON.stringify(obj.$attrs.width)); - console.log("cd text padding" + JSON.stringify(obj.$attrs.padding)); - console.log("cd text constraintSize" + JSON.stringify(obj.$attrs.constraintSize)); - console.log("cd text opacity" + JSON.stringify(obj.$attrs.opacity)); - console.log("cd text align" + JSON.stringify(obj.$attrs.align)); - console.log("cd text markAnchor type1" + typeof ({ - "x": "50.00vp", "y": "50.00vp" - })); - console.log("cd text markAnchor1" + JSON.stringify({ - "x": "50.00vp", "y": "50.00vp" - })); - console.log("cd text markAnchor type" + typeof (obj.$attrs.markAnchor)); - console.log("cd text markAnchor" + JSON.stringify(obj.$attrs.markAnchor)); - console.log("cd text offset" + JSON.stringify(obj.$attrs.offset)); - console.log("cd text position" + JSON.stringify(obj.$attrs.position)); - console.log("cd text flexGrow" + JSON.stringify(obj.$attrs.flexGrow)); - console.log("cd text flexShrink" + JSON.stringify(obj.$attrs.flexShrink)); - console.log("cd text alignSelf" + JSON.stringify(obj.$attrs.alignSelf)); - console.log("cd text borderStyle" + JSON.stringify(obj.$attrs.borderStyle)); - console.log("cd text borderRadius" + JSON.stringify(obj.$attrs.borderRadius)); - console.log("cd text borderWidth" + JSON.stringify(obj.$attrs.borderWidth)); - console.log("cd text borderColor" + JSON.stringify(obj.$attrs.borderColor)); - console.log("cd text backgroundColor" + JSON.stringify(obj.$attrs.backgroundColor)); - console.log("cd text enabled" + JSON.stringify(obj.$attrs.enabled)); - console.log("cd text zIndex" + JSON.stringify(obj.$attrs.zIndex)); - console.log("cd text fontColor" + JSON.stringify(obj.$attrs.fontColor)); - console.log("cd text visibility" + JSON.stringify(obj.$attrs.visibility)); - console.log("cd text fontSize" + JSON.stringify(obj.$attrs.fontSize)); - console.log("cd text minFontSize" + JSON.stringify(obj.$attrs.minFontSize)); - console.log("cd text maxFontSize" + JSON.stringify(obj.$attrs.maxFontSize)); - console.log("cd text fontWeight" + JSON.stringify(obj.$attrs.fontWeight)); - console.log("cd text fontStyle" + JSON.stringify(obj.$attrs.fontStyle)); - console.log("cd text fontFamily" + JSON.stringify(obj.$attrs.fontFamily)); - console.log("cd text textAlign" + JSON.stringify(obj.$attrs.textAlign)); - console.log("cd text textOverflow" + JSON.stringify(obj.$attrs.textOverflow)); - console.log("cd text lineHeight" + JSON.stringify(obj.$attrs.lineHeight)); - console.log("cd text baselineOffset" + JSON.stringify(obj.$attrs.baselineOffset)); - console.log("cd text maxLines" + JSON.stringify(obj.$attrs.maxLines)); - console.log("cd text textCase" + JSON.stringify(obj.$attrs.textCase)); - console.log("cd text decoration" + JSON.stringify(obj.$attrs.decoration)); - console.log("cd text decoration1" + JSON.stringify(JSON.stringify({ - type: "TextDecorationType.Underline", color: "#FFFF0000" - }))); - console.log("cd text direction" + JSON.stringify(obj.$attrs.direction)); - console.log("cd text aspectRatio" + JSON.stringify(obj.$attrs.aspectRatio)); - console.log("cd text fontColor" + JSON.stringify(obj.$attrs.fontColor)); expect(obj.$type).assertEqual('Text') expect(obj.$attrs.width).assertEqual('200.00vp') expect(obj.$attrs.padding).assertEqual('5.00vp') @@ -166,23 +118,6 @@ export default function textJsunit() { let strJson = getInspectorByKey('Text1'); let obj = JSON.parse(strJson); console.info("cd text1 component obj is: " + JSON.stringify(obj)); - console.log("cd text1 align" + JSON.stringify(obj.$attrs.align)); - console.log("cd text1 alignSelf" + JSON.stringify(obj.$attrs.alignSelf)); - console.log("cd text1 borderStyle" + JSON.stringify(obj.$attrs.borderStyle)); - console.log("cd text1 enabled" + JSON.stringify(obj.$attrs.enabled)); - console.log("cd text1 visibility" + JSON.stringify(obj.$attrs.visibility)); - console.log("cd text1 fontWeight" + JSON.stringify(obj.$attrs.fontWeight)); - console.log("cd text1 textAlign" + JSON.stringify(obj.$attrs.textAlign)); - console.log("cd text1 textOverflow" + JSON.stringify(obj.$attrs.textOverflow)); - console.log("cd text1 direction" + JSON.stringify(obj.$attrs.direction)); - console.log("cd text1 textCase" + JSON.stringify(obj.$attrs.textCase)); - console.log("cd text1 decoration" + JSON.stringify(obj.$attrs.decoration)); - console.log("cd text1 decoration1" + JSON.stringify(JSON.stringify({ - type: "TextDecorationType.LineThrough", color: "#FFFF0000" - }))); - console.log("cd text1 fontColor" + JSON.stringify(obj.$attrs.fontColor)); - console.log("cd text padding" + JSON.stringify(obj.$attrs.padding)); - console.log("cd text margin" + JSON.stringify(obj.$attrs.margin)) expect(obj.$attrs.direction).assertEqual("Direction.Ltr") expect(obj.$attrs.align).assertEqual("Alignment.Start") expect(obj.$attrs.alignSelf).assertEqual("ItemAlign.Start") @@ -209,20 +144,6 @@ export default function textJsunit() { let strJson = getInspectorByKey('Text2'); let obj = JSON.parse(strJson); console.info("cd text2 component obj is: " + JSON.stringify(obj)); - console.log("cd text2 align" + JSON.stringify(obj.$attrs.align)); - console.log("cd text2 alignSelf" + JSON.stringify(obj.$attrs.alignSelf)); - console.log("cd text2 borderStyle" + JSON.stringify(obj.$attrs.borderStyle)); - console.log("cd text2 visibility" + JSON.stringify(obj.$attrs.visibility)); - console.log("cd text2 fontWeight" + JSON.stringify(obj.$attrs.fontWeight)); - console.log("cd text2 textAlign" + JSON.stringify(obj.$attrs.textAlign)); - console.log("cd text2 textOverflow" + JSON.stringify(obj.$attrs.textOverflow)); - console.log("cd text2 direction" + JSON.stringify(obj.$attrs.direction)); - console.log("cd text2 textCase" + JSON.stringify(obj.$attrs.textCase)); - console.log("cd text2 decoration" + JSON.stringify(obj.$attrs.decoration)); - console.log("cd text2 decoration1" + JSON.stringify(JSON.stringify({ - type: "TextDecorationType.Noneh", color: "#FFFF0000" - }))); - console.log("cd text2 fontColor" + JSON.stringify(obj.$attrs.fontColor)); expect(obj.$attrs.direction).assertEqual("Direction.Rtl") expect(obj.$attrs.align).assertEqual("Alignment.TopEnd") expect(obj.$attrs.alignSelf).assertEqual("ItemAlign.Center") @@ -248,11 +169,6 @@ export default function textJsunit() { let strJson = getInspectorByKey('Text3'); let obj = JSON.parse(strJson); console.info("cd text3 component obj is: " + JSON.stringify(obj)); - console.log("cd text3 align" + JSON.stringify(obj.$attrs.align)); - console.log("cd text3 alignSelf" + JSON.stringify(obj.$attrs.alignSelf)); - console.log("cd text3 fontWeight" + JSON.stringify(obj.$attrs.fontWeight)); - console.log("cd text3 decoration" + JSON.stringify(obj.$attrs.decoration)); - console.log("cd text3 fontColor" + JSON.stringify(obj.$attrs.fontColor)); expect(obj.$attrs.align).assertEqual("Alignment.Top") expect(obj.$attrs.alignSelf).assertEqual("ItemAlign.End") expect(obj.$attrs.fontWeight).assertEqual("FontWeight.Lighter")