transition.test.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
  2. describe('/pages/CSS/transition/transition.uvue', () => {
  3. let page;
  4. beforeAll(async () => {
  5. page = await program.reLaunch('/pages/CSS/transition/transition')
  6. await page.waitFor(2000);
  7. });
  8. it("snap transition finish", async () => {
  9. await page.callMethod('changeWidthOrHeight')
  10. await page.callMethod('changeWidthProgress')
  11. await page.callMethod('changeMargin')
  12. await page.callMethod('changePadding')
  13. await page.callMethod('changeBackground')
  14. await page.callMethod('changeBackground2')
  15. await page.callMethod('changeStyleOpacity')
  16. await page.callMethod('propertyChangeBackground')
  17. await page.callMethod('changeTransform')
  18. await page.callMethod('changeTransformTranslate')
  19. await page.callMethod('changeTransformWithWidth')
  20. await page.callMethod('changeTransformWithOrigin')
  21. await page.callMethod('changeBorder')
  22. await page.callMethod('changestylePosition')
  23. // changeTransitionAll
  24. await page.callMethod('changeTransitionAll')
  25. await page.waitFor(3000)
  26. const image = await program.screenshot({
  27. fullPage: true
  28. })
  29. expect(image).toSaveImageSnapshot()
  30. })
  31. });