diff --git a/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.test.js b/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.test.js index bf0ba6e3439f4e824cca1e84282698093d06ded2..0753c3b800bd64e86e473a04f8d1f6c4cccaceaf 100644 --- a/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.test.js +++ b/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.test.js @@ -1,35 +1,45 @@ const PAGE_PATH = '/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh' describe('getCurrentPages', () => { - let page - it('page-style', async () => { - page = await program.navigateTo(PAGE_PATH) - - await page.callMethod('getPageStyle') - await page.waitFor(200) - const isEnablePullDownRefresh1 = (await page.data()).currentPageStyle.enablePullDownRefresh - expect(isEnablePullDownRefresh1).toBe(false) - - await page.callMethod('setPageStyle', true) - await page.waitFor(200) - await page.callMethod('getPageStyle') - await page.waitFor(200) - const isEnablePullDownRefresh2 = (await page.data()).currentPageStyle.enablePullDownRefresh - expect(isEnablePullDownRefresh2).toBe(true) - await page.callMethod('startPullDownRefresh') - await page.waitFor(500) - const image3 = await program.screenshot({fullPage: true}); - expect(image3).toSaveImageSnapshot(); - - await page.waitFor(3500) - - // setPageStyle - await page.callMethod('setPageStyle', false) - await page.waitFor(200) - await page.callMethod('startPullDownRefresh') - await page.waitFor(500) - const image2 = await program.screenshot({fullPage: true}); - expect(image2).toSaveImageSnapshot(); - + if (process.env.uniTestPlatformInfo.startsWith('IOS')) { + it('not-support', async () => { + expect(1).toBe(1) + }) + return + } + let page + it('page-style', async () => { + page = await program.navigateTo(PAGE_PATH) + + await page.callMethod('getPageStyle') + await page.waitFor(200) + const isEnablePullDownRefresh1 = (await page.data()).currentPageStyle.enablePullDownRefresh + expect(isEnablePullDownRefresh1).toBe(false) + + await page.callMethod('setPageStyle', true) + await page.waitFor(200) + await page.callMethod('getPageStyle') + await page.waitFor(200) + const isEnablePullDownRefresh2 = (await page.data()).currentPageStyle.enablePullDownRefresh + expect(isEnablePullDownRefresh2).toBe(true) + await page.callMethod('startPullDownRefresh') + await page.waitFor(500) + const image3 = await program.screenshot({ + fullPage: true + }); + expect(image3).toSaveImageSnapshot(); + + await page.waitFor(3500) + + // setPageStyle + await page.callMethod('setPageStyle', false) + await page.waitFor(200) + await page.callMethod('startPullDownRefresh') + await page.waitFor(500) + const image2 = await program.screenshot({ + fullPage: true + }); + expect(image2).toSaveImageSnapshot(); + }) })