rich-text.test.js 912 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
const PAGE_PATH = '/pages/component/rich-text/rich-text'

describe('rich-text-test', () => {

  // 先屏蔽 android 及 web 平台
  if (process.env.uniTestPlatformInfo.startsWith('android') || process.env.uniTestPlatformInfo.startsWith('web')) {
    it('other platform', () => {
      expect(1).toBe(1)
    })
    return
  }

  let page
  beforeAll(async () => {
    page = await program.reLaunch(PAGE_PATH)
    await page.waitFor(1000);
  })


  it('richt-text-height', async () => {
21
    await page.waitFor(1000);
22 23 24 25 26 27 28 29 30 31 32 33
    let beforeValue = await page.data('richTextHeight')
    await page.callMethod('changeText')
    await page.waitFor(500)
    await page.callMethod('changeText')
    await page.waitFor(500)
    let afterValue = await page.data('richTextHeight')
    console.log('beforeValue:', beforeValue)
    console.log('afterValue:', afterValue)
    expect(beforeValue).toBe(afterValue)
  })

})