transform-origin.test.js 775 B

123456789101112131415161718192021222324252627282930
  1. const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
  2. const isWeb = platformInfo.startsWith('web')
  3. const isMP = platformInfo.startsWith('mp')
  4. const PAGE_PATH = '/pages/CSS/transform/transform-origin'
  5. describe('transform-origin-test', () => {
  6. if (isWeb || isMP || process.env.UNI_TEST_DEVICES_DIRECTION == 'landscape') {
  7. it('other platform', () => {
  8. expect(1).toBe(1)
  9. })
  10. return
  11. }
  12. let page
  13. beforeAll(async () => {
  14. page = await program.reLaunch(PAGE_PATH)
  15. await page.waitFor(500);
  16. })
  17. it('transform-origin-test', async () => {
  18. await program.tap({x: 100, y: 160})
  19. await page.waitFor(500);
  20. const image = await program.screenshot({
  21. fullPage: true
  22. })
  23. expect(image).toSaveImageSnapshot()
  24. })
  25. })