diff --git a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets index 685551526e8e15383eece315b56cb53d237f1a01..7db4a5bbe1c96712d88c94741e162cd1ff46032f 100644 --- a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets +++ b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets @@ -74,9 +74,13 @@ export default function badgeJsunit() { console.log("yr badge0 position-BadgePosition.Right" + JSON.stringify(obj.$attrs.position)) expect(obj.$attrs.maxCount).assertEqual('99'); console.log("yr badge0 maxCount-'99'" + JSON.stringify(obj.$attrs.maxCount)) - expect(obj.$attrs.style.color).assertEqual('0xFFFFFF'); - expect(obj.$attrs.style.fontSize).assertEqual('16'); - expect(obj.$attrs.style.badgeSize).assertEqual('20'); + let style = JSON.parse(obj.$attrs.style) + console.log(style.color) + console.log(style.fontSize) + console.log(style.badgeSize) + expect(style.color).assertEqual('#FFFFFFFF'); + expect(style.fontSize).assertEqual('16.000000fp'); + expect(style.badgeSize).assertEqual('20.000000fp'); console.log("badge0 style : " + JSON.stringify(obj.$attrs.style)) console.info('testGetInspectorByKey END'); done(); diff --git a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets index da9fc4b52ebe9849f56dd5e27b0e86007a016a93..458e7fb12cffbfd6c5134a63cb5745b0ddc507de 100644 --- a/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets +++ b/ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets @@ -64,26 +64,29 @@ export default function sliderJsunit() { let strJson = getInspectorByKey('slider1'); let obj = JSON.parse(strJson); console.info("component obj is Slider: " + JSON.stringify(obj)); - console.info("slider1 blockColor" + JSON.stringify(obj.$attrs.blockColor)) - console.info("slider1 selectedColor" + JSON.stringify(obj.$attrs.selectedColor)) - console.info("slider1 trackColor" + JSON.stringify(obj.$attrs.trackColor)) - console.info("slider1 showTips" + JSON.stringify(obj.$attrs.showTips)) - console.info("slider1 showSteps" + JSON.stringify(obj.$attrs.showSteps)) - console.info("slider1 value" + JSON.stringify(obj.$attrs.value)) - console.info("slider1 min" + JSON.stringify(obj.$attrs.min)) - console.info("slider1 max" + JSON.stringify(obj.$attrs.max)) - console.info("slider1 step" + JSON.stringify(obj.$attrs.step)) - console.info("slider1 style" + JSON.stringify(obj.$attrs.style)) - expect(obj.$attrs.blockColor).assertEqual('#FFFF0000') - expect(obj.$attrs.selectedColor).assertEqual('#FF0000FF') - expect(obj.$attrs.trackColor).assertEqual('#FF808080') - expect(obj.$attrs.showTips).assertEqual("false") - expect(obj.$attrs.showSteps).assertEqual("false") - expect(obj.$attrs.value).assertEqual(40.000000.toFixed(6)) - expect(obj.$attrs.min).assertEqual(0.000000.toFixed(6)) - expect(obj.$attrs.max).assertEqual(100.000000.toFixed(6)) - expect(obj.$attrs.step).assertEqual(1.000000.toFixed(6)) - expect(obj.$attrs.style).assertEqual("SliderStyle.Outset") + + console.info("component obj is Slider: " + JSON.stringify(obj.$attrs.constructor)); + + console.info("slider1 blockColor " + JSON.stringify(obj.$attrs.constructor.blockColor)) + console.info("slider1 selectedColor " + JSON.stringify(obj.$attrs.constructor.selectedColor)) + console.info("slider1 trackColor " + JSON.stringify(obj.$attrs.constructor.trackColor)) + console.info("slider1 showTips " + JSON.stringify(obj.$attrs.constructor.showTips)) + console.info("slider1 showSteps " + JSON.stringify(obj.$attrs.constructor.showSteps)) + console.info("slider1 value " + JSON.stringify(obj.$attrs.constructor.value)) + console.info("slider1 min " + JSON.stringify(obj.$attrs.constructor.min)) + console.info("slider1 max " + JSON.stringify(obj.$attrs.constructor.max)) + console.info("slider1 step " + JSON.stringify(obj.$attrs.constructor.step)) + console.info("slider1 style " + JSON.stringify(obj.$attrs.constructor.style)) + expect(obj.$attrs.constructor.blockColor).assertEqual('#FFFF0000') + expect(obj.$attrs.constructor.selectedColor).assertEqual('#FF0000FF') + expect(obj.$attrs.constructor.trackColor).assertEqual('#FF808080') + expect(obj.$attrs.constructor.showTips).assertEqual("false") + expect(obj.$attrs.constructor.showSteps).assertEqual("false") + expect(obj.$attrs.constructor.value).assertEqual(40.000000.toFixed(6)) + expect(obj.$attrs.constructor.min).assertEqual(0.000000.toFixed(6)) + expect(obj.$attrs.constructor.max).assertEqual(100.000000.toFixed(6)) + expect(obj.$attrs.constructor.step).assertEqual(1.000000.toFixed(6)) + expect(obj.$attrs.constructor.style).assertEqual("SliderStyle.Outset") console.info('testGetSliderAttr1 END'); done(); }); @@ -98,12 +101,12 @@ export default function sliderJsunit() { let strJson = getInspectorByKey('slider2'); let obj = JSON.parse(strJson); console.info("component obj is Slider: " + JSON.stringify(obj)); - console.info("slider2 showTips" + JSON.stringify(obj.$attrs.showTips)) - console.info("slider2 showSteps" + JSON.stringify(obj.$attrs.showSteps)) - console.info("slider1 style" + JSON.stringify(obj.$attrs.style)) - expect(obj.$attrs.showTips).assertEqual("true") - expect(obj.$attrs.showSteps).assertEqual("true") - expect(obj.$attrs.style).assertEqual("SliderStyle.Inset") + console.info("slider2 showTips " + JSON.stringify(obj.$attrs.constructor.showTips)) + console.info("slider2 showSteps " + JSON.stringify(obj.$attrs.constructor.showSteps)) + console.info("slider1 style " + JSON.stringify(obj.$attrs.constructor.style)) + expect(obj.$attrs.constructor.showTips).assertEqual("true") + expect(obj.$attrs.constructor.showSteps).assertEqual("true") + expect(obj.$attrs.constructor.style).assertEqual("SliderStyle.Inset") console.info('testGetSliderAttr2 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 7835446bf6754cf5aef9bca1b6f6674384e2a73c..bc444b8bb636c392410c00db1268d07bf3bf337c 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 @@ -135,7 +135,7 @@ export default function textJsunit() { expect(obj.$attrs.zIndex).assertEqual(1) expect(obj.$attrs.fontColor).assertEqual("#FF000000") expect(obj.$attrs.visibility).assertEqual("Visibility.Visible") - expect(obj.$attrs.fontSize).assertEqual("15") + expect(obj.$attrs.fontSize).assertEqual("15.000000fp") expect(obj.$attrs.fontWeight).assertEqual("FontWeight.Bold") expect(obj.$attrs.fontStyle).assertEqual("FontStyle.Italic") expect(obj.$attrs.fontFamily).assertEqual("sans-serif") diff --git a/ace/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets b/ace/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets index 12d77424510f3e01ed51342f1153bef69b1ab418..a8dbc04572a921e4ad6564c9d7f6887638322289 100644 --- a/ace/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets +++ b/ace/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets @@ -92,8 +92,8 @@ export default function listItemJsunit() { console.log('ListItem2‘s sticky is ' + JSON.stringify(obj.$attrs.sticky)) console.log('ListItem2‘s editable is ' + JSON.stringify(obj.$attrs.editable)) await sleep(1) - expect(obj.$attr.sticky).assertEqual('Sticky.Opacity') - expect(obj.$attr.editable).assertEqual('true') + expect(obj.$attrs.sticky).assertEqual('Sticky.Opacity') + expect(obj.$attrs.editable).assertEqual('true') console.info('++++++++++++++++ ListItem TestCase 3 End ++++++++++++++++'); done(); }); diff --git a/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets b/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets index bdf7ec9a5980fe981f5fd6ac284fd6bfefcc6089..d6936db3378855fae980df1ac6ff3e4650c05dd2 100644 --- a/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets +++ b/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets @@ -69,10 +69,10 @@ export default function navigationJsunit() { let obj = JSON.parse(strJson); console.info("[navigation1] get inspector value is: " + JSON.stringify(obj)); expect(obj.$type).assertEqual('Navigation') - expect(obj.$attrs.navigationTitle).assertEqual('title') - expect(obj.$attrs.navigationSubTitle).assertEqual('subtitle') - expect(obj.$attrs.hideNavigationBackButton).assertFalse() - expect(obj.$attrs.hideNavigationBar).assertFalse() + expect(obj.$attrs.title).assertEqual('title') + expect(obj.$attrs.subtitle).assertEqual('subtitle') + expect(obj.$attrs.hideBackButton).assertFalse() + expect(obj.$attrs.hideTitleBar).assertFalse() console.info('testNavigation010 End'); done(); }); @@ -89,8 +89,8 @@ export default function navigationJsunit() { let obj = JSON.parse(strJson); console.info("[navigation2] get inspector value is: " + JSON.stringify(obj)); expect(obj.$type).assertEqual('Navigation') - expect(obj.$attrs.hideNavigationBar).assertTrue() - expect(obj.$attrs.hideNavigationBackButton).assertTrue() + expect(obj.$attrs.hideTitleBar).assertTrue() + expect(obj.$attrs.hideBackButton).assertTrue() console.info('testNavigation020 End'); done(); }); diff --git a/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets b/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets index 269eb9d4bdb1cca422500466e97ace9c24b7d989..5987b0f956ce84347be70434006a2c0b5933963b 100644 --- a/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets +++ b/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets @@ -68,7 +68,7 @@ export default function textAreaJsunit() { let strJson = getInspectorByKey('textArea1'); let obj = JSON.parse(strJson); console.info("[textArea1] get inspector value is: " + JSON.stringify(obj)); - expect(obj.$type).assertEqual('Textarea') + expect(obj.$type).assertEqual('TextArea') expect(obj.$attrs.placeholderColor).assertEqual('#FFC0C0C0') expect(obj.$attrs.textAlign).assertEqual('TextAlign.Start') expect(obj.$attrs.caretColor).assertEqual('#FF000000') @@ -91,7 +91,7 @@ export default function textAreaJsunit() { let strJson = getInspectorByKey('textArea2'); let obj = JSON.parse(strJson); console.info("[textArea2] get inspector value is: " + JSON.stringify(obj)); - expect(obj.$type).assertEqual('Textarea') + expect(obj.$type).assertEqual('TextArea') expect(obj.$attrs.textAlign).assertEqual('TextAlign.Center') console.info('testTextArea020 End'); done(); @@ -107,7 +107,7 @@ export default function textAreaJsunit() { let strJson = getInspectorByKey('textArea3'); let obj = JSON.parse(strJson); console.info("[textArea3] get inspector value is: " + JSON.stringify(obj)); - expect(obj.$type).assertEqual('Textarea') + expect(obj.$type).assertEqual('TextArea') expect(obj.$attrs.textAlign).assertEqual('TextAlign.End') console.info('testTextArea030 End'); done(); diff --git a/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets b/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets index bf56067b1a4a84226ba9422fa96697e38ee8187b..d849d787a88d5e4fa622250a22d0d409e6d36f13 100644 --- a/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets +++ b/ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets @@ -88,7 +88,7 @@ export default function textInputJsunit() { expect(obj.$attrs.fontStyle).assertEqual('FontStyle.Italic') expect(obj.$attrs.fontSize).assertEqual('40.000000fp') expect(obj.$attrs.height).assertEqual('60.000000vp') - expect(obj.$attrs.height).assertContain('FontStyle.Normal') + expect(obj.$attrs.placeholderFont).assertContain('FontStyle.Normal') console.info('testTextInput010 End'); done(); });