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

4 5
describe('dialog page', () => {
  if (process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
6 7 8 9 10
  	it('skip app-webview', () => {
  		expect(1).toBe(1)
  	})
  	return
  }
11 12
  if (isMP) {
  	it('skip mp', () => {
13 14 15 16
  		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)
  })
})