提交 17015846 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test(chooseLocation): 测试自定义插件规避 ios 15以下

上级 a5327a21
...@@ -38,14 +38,20 @@ describe('dialog page', () => { ...@@ -38,14 +38,20 @@ describe('dialog page', () => {
expect(lifecycleNum).toBe(originLifeCycleNum - 1) expect(lifecycleNum).toBe(originLifeCycleNum - 1)
}) })
if (isIos) { if (isIos) {
it('call chooseLocation in uts plugin', async () => { // 15以下的模拟器所对应的xcode不能编译自定义插件,大于15是因为某台设备,会用xcode14.1跑15.5的设备
page = await program.reLaunch('/pages/API/choose-location/choose-location') let version = process.env.uniTestPlatformInfo
await page.waitFor('view'); let split = version.split(" ")
await page.callMethod('chooseLocationByPlugin') version = parseInt(split[split.length - 1])
await page.waitFor(1000) if (version > 15) {
const lifecycleNum = await page.callMethod('getLifeCycleNum') it('call chooseLocation in uts plugin', async () => {
expect(lifecycleNum).toBe(originLifeCycleNum - 1) page = await program.reLaunch('/pages/API/choose-location/choose-location')
}) await page.waitFor('view');
await page.callMethod('chooseLocationByPlugin')
await page.waitFor(1000)
const lifecycleNum = await page.callMethod('getLifeCycleNum')
expect(lifecycleNum).toBe(originLifeCycleNum - 1)
})
}
} }
afterAll(async () => { afterAll(async () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册