提交 14cdd518 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新dialogPage自动化测试用例

上级 29276fe0
...@@ -308,6 +308,22 @@ describe('dialog page', () => { ...@@ -308,6 +308,22 @@ describe('dialog page', () => {
await page.waitFor(2000); await page.waitFor(2000);
await page.callMethod('jest_CloseDialog1') await page.callMethod('jest_CloseDialog1')
}) })
it('dialogPage hideStatusBar hideBottomNavigationIndicator', async () => {
await page.callMethod('openDialog2ForTest');
await page.waitFor(1000);
await page.callMethod('setPageStyleForTest', {
hideStatusBar: true,
hideBottomNavigationIndicator: true
});
await page.waitFor(2000);
const image = await program.screenshot({
deviceShot: true
});
expect(image).toSaveImageSnapshot();
await page.waitFor(2000);
await page.callMethod('closeDialog2ForTest');
});
afterAll(async () => { afterAll(async () => {
await page.callMethod('setLifeCycleNum', initLifeCycleNum) await page.callMethod('setLifeCycleNum', initLifeCycleNum)
......
...@@ -193,6 +193,19 @@ ...@@ -193,6 +193,19 @@
} }
this.jest_click_x = systemInfo.screenWidth / 2 * ratio this.jest_click_x = systemInfo.screenWidth / 2 * ratio
this.jest_click_y = systemInfo.statusBarHeight * ratio + 10 this.jest_click_y = systemInfo.statusBarHeight * ratio + 10
},
openDialog2ForTest() {
uni.openDialogPage({
url: '/pages/API/dialog-page/dialog-2'
});
},
closeDialog2ForTest() {
uni.closeDialogPage({});
},
setPageStyleForTest(style : UTSJSONObject) {
const pages = getDialogPages();
const currentPage = pages[pages.length - 1];
currentPage.setPageStyle(style);
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册