rpx2px.test.js 579 B

12345678910111213141516171819202122232425
  1. const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
  2. const isMP = platformInfo.startsWith('mp')
  3. const PAGE_PATH = '/pages/API/rpx2px/rpx2px'
  4. describe('API-rpx2px', () => {
  5. if(isMP) {
  6. it('not support', () => {
  7. expect(1).toBe(1)
  8. })
  9. return
  10. }
  11. it('rpx2px', async () => {
  12. page = await program.reLaunch(PAGE_PATH)
  13. await page.waitFor('view');
  14. const btnConvert = await page.$('#convert')
  15. await btnConvert.tap()
  16. await page.waitFor(100)
  17. const data = await page.data()
  18. expect(data.result).toBe(true)
  19. });
  20. });