issues-16118.test.js 891 B

1234567891011121314151617181920212223242526272829
  1. const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
  2. const isMP = platformInfo.startsWith('mp')
  3. const isHarmony = platformInfo.startsWith('harmony')
  4. describe('component-native-sticky-section', () => {
  5. if (isMP) {
  6. it('skip mp', () => {
  7. expect(1).toBe(1)
  8. })
  9. return
  10. }
  11. it('check_issues-16118', async () => {
  12. let page = await program.reLaunch('/pages/component/sticky-section/issues-16118')
  13. await page.waitFor(500)
  14. //显示内容
  15. await page.callMethod('switchDisplay')
  16. await page.waitFor(1500)
  17. //隐藏内容
  18. await page.callMethod('switchDisplay')
  19. await page.waitFor(1500)
  20. //显示内容
  21. await page.callMethod('switchDisplay')
  22. await page.waitFor(500)
  23. //截图查看内容位置是否符合预期
  24. const image = await program.screenshot({fullPage: true});
  25. expect(image).toSaveImageSnapshot();
  26. })
  27. })