提交 9d2df564 编写于 作者: H hekun
上级 ab683ac7
......@@ -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%')
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册