提交 44b7b4f5 编写于 作者: 雪洛's avatar 雪洛

test: iOS端屏蔽不支持的测试例

上级 d20a28c2
const PAGE_PATH = '/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh' const PAGE_PATH = '/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh'
describe('getCurrentPages', () => { describe('getCurrentPages', () => {
let page if (process.env.uniTestPlatformInfo.startsWith('IOS')) {
it('page-style', async () => { it('not-support', async () => {
page = await program.navigateTo(PAGE_PATH) expect(1).toBe(1)
})
await page.callMethod('getPageStyle') return
await page.waitFor(200) }
const isEnablePullDownRefresh1 = (await page.data()).currentPageStyle.enablePullDownRefresh let page
expect(isEnablePullDownRefresh1).toBe(false) it('page-style', async () => {
page = await program.navigateTo(PAGE_PATH)
await page.callMethod('setPageStyle', true)
await page.waitFor(200) await page.callMethod('getPageStyle')
await page.callMethod('getPageStyle') await page.waitFor(200)
await page.waitFor(200) const isEnablePullDownRefresh1 = (await page.data()).currentPageStyle.enablePullDownRefresh
const isEnablePullDownRefresh2 = (await page.data()).currentPageStyle.enablePullDownRefresh expect(isEnablePullDownRefresh1).toBe(false)
expect(isEnablePullDownRefresh2).toBe(true)
await page.callMethod('startPullDownRefresh') await page.callMethod('setPageStyle', true)
await page.waitFor(500) await page.waitFor(200)
const image3 = await program.screenshot({fullPage: true}); await page.callMethod('getPageStyle')
expect(image3).toSaveImageSnapshot(); await page.waitFor(200)
const isEnablePullDownRefresh2 = (await page.data()).currentPageStyle.enablePullDownRefresh
await page.waitFor(3500) expect(isEnablePullDownRefresh2).toBe(true)
await page.callMethod('startPullDownRefresh')
// setPageStyle await page.waitFor(500)
await page.callMethod('setPageStyle', false) const image3 = await program.screenshot({
await page.waitFor(200) fullPage: true
await page.callMethod('startPullDownRefresh') });
await page.waitFor(500) expect(image3).toSaveImageSnapshot();
const image2 = await program.screenshot({fullPage: true});
expect(image2).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();
}) })
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册