long-waterflow-nested.test.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
  2. const isMP = platformInfo.startsWith('mp')
  3. const isWeb = platformInfo.startsWith('web')
  4. const isHarmony = platformInfo.startsWith('harmony')
  5. const isIOS = platformInfo.startsWith('ios')
  6. describe('long-waterflow-nested', () => {
  7. if (isWeb || isMP || isHarmony || isIOS || process.env.UNI_TEST_DEVICES_DIRECTION == 'landscape') {
  8. it('dummyTest', async () => {
  9. expect(1).toBe(1)
  10. })
  11. return
  12. }
  13. let page
  14. beforeAll(async () => {
  15. //打开list-view测试页
  16. page = await program.reLaunch('/pages/template/long-waterflow-nested/long-waterflow-nested')
  17. await page.waitFor(600)
  18. })
  19. //测试验证Waterflow下拉刷新是否闪退问题
  20. it('check_refresherabort', async () => {
  21. //部分安卓设备需要延迟一段时间swipe才生效 此处暂时延迟1秒
  22. await page.waitFor(1000);
  23. // 仅App端支持手势下拉刷新
  24. await program.swipe({
  25. startPoint: {x: 100,y: 300},
  26. endPoint: {x: 100,y: 600},
  27. duration: 100
  28. })
  29. await page.waitFor(1500)
  30. expect(page.path).toBe('pages/template/long-waterflow-nested/long-waterflow-nested')
  31. });
  32. })