提交 354384a3 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

test: 修改插件中访问网络api的自动化测试例,屏蔽14及以下模拟器

上级 3ca1ca4b
......@@ -31,6 +31,11 @@ describe('ExtApi-DownloadFile', () => {
expect(res).toBe(true);
});
// 15以下的模拟器所对应的xcode不能编译自定义插件
let version = process.env.uniTestPlatformInfo
let split = version.split(" ")
version = parseInt(split[split.length - 1])
if(!process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('ios') || version > 14) {
it('Check Download File In UTS Module', async () => {
res = await page.callMethod('jest_uts_module_invoked')
await page.waitFor(2000);
......@@ -38,6 +43,7 @@ describe('ExtApi-DownloadFile', () => {
expect(res).toBe(true)
})
}
}
let shouldTestCookie = false
......
......@@ -98,7 +98,7 @@ describe('ExtApi-Request', () => {
shouldTestCookie = version > 9
}
if (process.env.uniTestPlatformInfo.startsWith('IOS') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) {
if (process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('ios') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) {
shouldTestCookie = true
}
......@@ -130,10 +130,17 @@ describe('ExtApi-Request', () => {
res = await page.data('jest_result');
expect(res).toBe(true)
})
// 15以下的模拟器所对应的xcode不能编译自定义插件
let version = process.env.uniTestPlatformInfo
let split = version.split(" ")
version = parseInt(split[split.length - 1])
if(!process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('ios') || version > 14) {
it('Check Post In UTS Module', async () => {
res = await page.callMethod('jest_uts_module_invoked')
await page.waitFor(2000);
res = await page.data('jest_result');
expect(res).toBe(true)
})
}
});
......@@ -36,12 +36,18 @@ describe('ExtApi-UploadFile', () => {
expect(res).toBe(true)
});
// 15以下的模拟器所对应的xcode不能编译自定义插件
let version = process.env.uniTestPlatformInfo
let split = version.split(" ")
version = parseInt(split[split.length - 1])
if(!process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('ios') || version > 14) {
it('Check Upload File In UTS Module', async () => {
res = await page.callMethod('jest_uts_module_invoked')
await page.waitFor(2000);
res = await page.data('jest_result');
expect(res).toBe(true)
})
}
let shouldTestCookie = false
if (process.env.uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册