提交 a9bdc413 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test(pullDownRefresh): 针对 ios 平台优化测试例

上级 4cde2904
const PAGE_PATH = "/pages/API/pull-down-refresh/pull-down-refresh" const PAGE_PATH = "/pages/API/pull-down-refresh/pull-down-refresh"
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isIos = platformInfo.startsWith('ios')
const isWeb = platformInfo.startsWith('web')
describe("payment", () => { describe("payment", () => {
if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW === 'true') { if (isWeb || process.env.UNI_AUTOMATOR_APP_WEBVIEW === 'true') {
it('web || app-webview', () => { it('web || app-webview', () => {
expect(1).toBe(1) expect(1).toBe(1)
}) })
...@@ -16,6 +19,11 @@ describe("payment", () => { ...@@ -16,6 +19,11 @@ describe("payment", () => {
pulldownRefreshTriggered: false pulldownRefreshTriggered: false
}) })
if (isIos) {
// 暂时通过点击关闭授权弹框,避免影响 swipe 测试
await program.tap({x: 100, y: 500})
}
await program.swipe({ await program.swipe({
startPoint: { startPoint: {
x: 100, x: 100,
...@@ -30,4 +38,4 @@ describe("payment", () => { ...@@ -30,4 +38,4 @@ describe("payment", () => {
await page.waitFor(1500) await page.waitFor(1500)
expect(await page.data('pulldownRefreshTriggered')).toBe(true) expect(await page.data('pulldownRefreshTriggered')).toBe(true)
}); });
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册