未验证 提交 2da53730 编写于 作者: O openharmony_ci 提交者: Gitee

!9582 【ACE子系统】新增接口用例

Merge pull request !9582 from hekun/master
...@@ -35,6 +35,13 @@ struct ModalTransitionExample { ...@@ -35,6 +35,13 @@ struct ModalTransitionExample {
@Builder myBuilder() { @Builder myBuilder() {
Column() { 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") Button("transition modal 2")
.margin(10) .margin(10)
.fontSize(20) .fontSize(20)
...@@ -48,6 +55,10 @@ struct ModalTransitionExample { ...@@ -48,6 +55,10 @@ struct ModalTransitionExample {
.onClick(()=>{ .onClick(()=>{
this.isShow = false; 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%') .width('100%')
.height('100%') .height('100%')
......
...@@ -186,17 +186,10 @@ export default function ApiCommponentAddJsunit() { ...@@ -186,17 +186,10 @@ export default function ApiCommponentAddJsunit() {
console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`);
}) })
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
let driver = Driver.create(); let strJson = getInspectorByKey('searchAdd');
let searchclick = await driver.findComponent(ON.id('searchAdd')); let obj = JSON.parse(strJson);
await searchclick.click(); console.info("[apiCommponentAddJsunit_0500'] component obj is: " + obj.$type);
searchclick.longClick(); expect(obj.$type).assertEqual('Search');
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('黏贴');
done(); done();
}); });
...@@ -242,17 +235,10 @@ export default function ApiCommponentAddJsunit() { ...@@ -242,17 +235,10 @@ export default function ApiCommponentAddJsunit() {
console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`);
}) })
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
let driver = Driver.create(); let strJson = getInspectorByKey('textAreaAdd');
let searchclick = await driver.findComponent(ON.id('textAreaAdd')); let obj = JSON.parse(strJson);
await searchclick.click(); console.info("[apiCommponentAddJsunit_0700'] component obj is: " + obj.$type);
searchclick.longClick(); expect(obj.$type).assertEqual('TextArea');
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('黏贴');
done(); done();
}); });
...@@ -272,19 +258,12 @@ export default function ApiCommponentAddJsunit() { ...@@ -272,19 +258,12 @@ export default function ApiCommponentAddJsunit() {
}).catch(err => { }).catch(err => {
console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`);
}) })
await CommonFunc.sleep(1000); let strJson = getInspectorByKey('textInputAdd');
let driver = Driver.create(); let obj = JSON.parse(strJson);
let searchclick = await driver.findComponent(ON.id('textInputAdd')); console.info("[apiCommponentAddJsunit_0800'] component obj is: " + obj.$type);
await searchclick.click(); expect(obj.$type).assertEqual('TextInput');
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('黏贴');
done(); done();
}); });
it('apiCommponentAddJsunit_0900', 0, async function (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.
先完成此消息的编辑!
想要评论请 注册