choose-location.test.js 745 字节
Newer Older
1 2 3
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
isWeixin = platformInfo == 'mp-weixin'

4 5
describe('dialog page', () => {
  if (process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
6 7 8 9 10 11 12 13 14 15 16
  	it('skip app-webview', () => {
  		expect(1).toBe(1)
  	})
  	return
  }
  if (isWeixin) {
  	it('skip app-webview', () => {
  		expect(1).toBe(1)
  	})
  	return
  }
17 18 19 20 21 22 23 24 25 26 27 28 29 30

  let page;
  beforeAll(async () => {
    page = await program.reLaunch('/pages/API/choose-location/choose-location')
    await page.waitFor('view');
  });

  it('dialogPage should empty', async () => {
		await page.callMethod('chooseLocation')
		await page.waitFor(1000)
		const dialogPagesNum = await page.data('dialogPagesNum')
		expect(dialogPagesNum).toBe(0)
  })
})