transition-transform.test.js 869 B

12345678910111213141516171819202122232425262728293031323334
  1. describe('/pages/CSS/transition/transition-transform.uvue', () => {
  2. const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
  3. const isAndroid = platformInfo.startsWith('android')
  4. // 先屏蔽 android 平台
  5. if (isAndroid) {
  6. it('other platform', () => {
  7. expect(1).toBe(1)
  8. })
  9. return
  10. }
  11. let page;
  12. beforeAll(async () => {
  13. page = await program.reLaunch('/pages/CSS/transition/transition-transform')
  14. await page.waitFor(2000);
  15. });
  16. it("snap transition finish", async () => {
  17. await page.callMethod('open')
  18. await page.waitFor(3000)
  19. const windowInfo = await program.callUniMethod('getWindowInfo');
  20. const image = await program.screenshot({
  21. deviceShot: true,
  22. area: {
  23. x: 0,
  24. y: windowInfo.safeAreaInsets.top + 44
  25. }
  26. })
  27. expect(image).toSaveImageSnapshot()
  28. })
  29. });