diff --git a/pages/API/dialog-page/dialog-page.test.js b/pages/API/dialog-page/dialog-page.test.js index a04a9541557f2e87baffaed4358f7289a03fa5e0..b7abc7bb46697ee22ba0ee62eacbf4d905bc201f 100644 --- a/pages/API/dialog-page/dialog-page.test.js +++ b/pages/API/dialog-page/dialog-page.test.js @@ -308,6 +308,22 @@ describe('dialog page', () => { await page.waitFor(2000); 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 () => { await page.callMethod('setLifeCycleNum', initLifeCycleNum) diff --git a/pages/API/dialog-page/dialog-page.uvue b/pages/API/dialog-page/dialog-page.uvue index 28573013858fa18b519699b1c0d57d89dc0bd699..b77b2032887f07abc2bafaacd9c0284a81cde3d1 100644 --- a/pages/API/dialog-page/dialog-page.uvue +++ b/pages/API/dialog-page/dialog-page.uvue @@ -193,6 +193,19 @@ } this.jest_click_x = systemInfo.screenWidth / 2 * ratio 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); } } }