diff --git a/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/bindConver.ets b/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/bindConver.ets index fb0ab89c9dd2b61fae69c5a1f92010207c3943c3..e7bd37b6305851b6fd768081eb84e7e6a817a46b 100644 --- a/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/bindConver.ets +++ b/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/bindConver.ets @@ -35,6 +35,13 @@ struct ModalTransitionExample { @Builder myBuilder() { Column() { + Button("sheetSize") + .margin(10) + .fontSize(20) + .onClick(()=>{ + this.isShow2 = true; + }).bindSheet($$this.isShow, this.myBuilder(), {height: SheetSize.MEDIUM, dragBar: this.showDragBar, backgroundColor: Color.Green, onAppear: () => {console.log("BindSheet onAppear.")}, onDisappear: () => {console.log("BindSheet onDisappear.")}}) + .bindSheet($$this.isShow, this.myBuilder(), {height: SheetSize.LARGE, dragBar: this.showDragBar, backgroundColor: Color.Green, onAppear: () => {console.log("BindSheet onAppear.")}, onDisappear: () => {console.log("BindSheet onDisappear.")}}) Button("transition modal 2") .margin(10) .fontSize(20) @@ -48,6 +55,10 @@ struct ModalTransitionExample { .onClick(()=>{ this.isShow = false; }) + Progress({ value: 100, total: 100,type: ProgressType.Capsule }).width(100).height(50) + .style({borderColor: Color.Blue, borderWidth: 1, content: 'Installing...',enableSmoothEffect:false, + font: {size: 13, style: FontStyle.Normal}, fontColor: Color.Gray, + enableScanEffect: false, showDefaultPercentage: false}) } .width('100%') .height('100%') diff --git a/arkui/ace_ets_component_ui/entry/src/main/ets/test/ApiCommponentAddJsunit.test.ets b/arkui/ace_ets_component_ui/entry/src/main/ets/test/ApiCommponentAddJsunit.test.ets index 365bc3713e25e8f59c714ed5f506d1af6c89cfd6..20121d97fa74d5a4ba26830e9f3f997c9b7717e0 100644 --- a/arkui/ace_ets_component_ui/entry/src/main/ets/test/ApiCommponentAddJsunit.test.ets +++ b/arkui/ace_ets_component_ui/entry/src/main/ets/test/ApiCommponentAddJsunit.test.ets @@ -186,17 +186,10 @@ export default function ApiCommponentAddJsunit() { console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); }) await CommonFunc.sleep(1000); - let driver = Driver.create(); - let searchclick = await driver.findComponent(ON.id('searchAdd')); - await searchclick.click(); - searchclick.longClick(); - await CommonFunc.sleep(4000); - let textComponent3 = await driver.findComponent(ON.text('黏贴')); - await CommonFunc.sleep(500); - // wether if - let text = await textComponent3.getText(); - console.info("[apiCommponentAddJsunit_0500] onScrollText: " + text); - expect(text).assertEqual('黏贴'); + let strJson = getInspectorByKey('searchAdd'); + let obj = JSON.parse(strJson); + console.info("[apiCommponentAddJsunit_0500'] component obj is: " + obj.$type); + expect(obj.$type).assertEqual('Search'); done(); }); @@ -242,17 +235,10 @@ export default function ApiCommponentAddJsunit() { console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); }) await CommonFunc.sleep(1000); - let driver = Driver.create(); - let searchclick = await driver.findComponent(ON.id('textAreaAdd')); - await searchclick.click(); - searchclick.longClick(); - await CommonFunc.sleep(4000); - let textComponent3 = await driver.findComponent(ON.text('黏贴')); - await CommonFunc.sleep(100); - // wether if - let text = await textComponent3.getText(); - console.info("[apiCommponentAddJsunit_0700] onScrollText: " + text); - expect(text).assertEqual('黏贴'); + let strJson = getInspectorByKey('textAreaAdd'); + let obj = JSON.parse(strJson); + console.info("[apiCommponentAddJsunit_0700'] component obj is: " + obj.$type); + expect(obj.$type).assertEqual('TextArea'); done(); }); @@ -272,19 +258,12 @@ export default function ApiCommponentAddJsunit() { }).catch(err => { console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); }) - await CommonFunc.sleep(1000); - let driver = Driver.create(); - let searchclick = await driver.findComponent(ON.id('textInputAdd')); - await searchclick.click(); - searchclick.longClick(); - await CommonFunc.sleep(4000); - let textComponent3 = await driver.findComponent(ON.text('黏贴')); - await CommonFunc.sleep(100); - // wether if - let text = await textComponent3.getText(); - console.info("[apiCommponentAddJsunit_0800] onScrollText: " + text); - expect(text).assertEqual('黏贴'); + let strJson = getInspectorByKey('textInputAdd'); + let obj = JSON.parse(strJson); + console.info("[apiCommponentAddJsunit_0800'] component obj is: " + obj.$type); + expect(obj.$type).assertEqual('TextInput'); done(); + }); it('apiCommponentAddJsunit_0900', 0, async function (done) {