提交 0e7f75ec 编写于 作者: DCloud_iOS_XHY's avatar DCloud_iOS_XHY

Merge branch 'alpha' of https://gitcode.net/dcloud/hello-uni-app-x into alpha

* 'alpha' of https://gitcode.net/dcloud/hello-uni-app-x:
  test: 修改插件中访问网络api的自动化测试例,屏蔽14及以下模拟器
...@@ -31,6 +31,11 @@ describe('ExtApi-DownloadFile', () => { ...@@ -31,6 +31,11 @@ describe('ExtApi-DownloadFile', () => {
expect(res).toBe(true); 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 () => { it('Check Download File In UTS Module', async () => {
res = await page.callMethod('jest_uts_module_invoked') res = await page.callMethod('jest_uts_module_invoked')
await page.waitFor(2000); await page.waitFor(2000);
...@@ -38,6 +43,7 @@ describe('ExtApi-DownloadFile', () => { ...@@ -38,6 +43,7 @@ describe('ExtApi-DownloadFile', () => {
expect(res).toBe(true) expect(res).toBe(true)
}) })
} }
}
let shouldTestCookie = false let shouldTestCookie = false
......
...@@ -98,7 +98,7 @@ describe('ExtApi-Request', () => { ...@@ -98,7 +98,7 @@ describe('ExtApi-Request', () => {
shouldTestCookie = version > 9 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 shouldTestCookie = true
} }
...@@ -130,10 +130,17 @@ describe('ExtApi-Request', () => { ...@@ -130,10 +130,17 @@ describe('ExtApi-Request', () => {
res = await page.data('jest_result'); res = await page.data('jest_result');
expect(res).toBe(true) 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 () => { it('Check Post In UTS Module', async () => {
res = await page.callMethod('jest_uts_module_invoked') res = await page.callMethod('jest_uts_module_invoked')
await page.waitFor(2000); await page.waitFor(2000);
res = await page.data('jest_result'); res = await page.data('jest_result');
expect(res).toBe(true) expect(res).toBe(true)
}) })
}
}); });
...@@ -36,12 +36,18 @@ describe('ExtApi-UploadFile', () => { ...@@ -36,12 +36,18 @@ describe('ExtApi-UploadFile', () => {
expect(res).toBe(true) 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 () => { it('Check Upload File In UTS Module', async () => {
res = await page.callMethod('jest_uts_module_invoked') res = await page.callMethod('jest_uts_module_invoked')
await page.waitFor(2000); await page.waitFor(2000);
res = await page.data('jest_result'); res = await page.data('jest_result');
expect(res).toBe(true) expect(res).toBe(true)
}) })
}
let shouldTestCookie = false let shouldTestCookie = false
if (process.env.uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) { 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.
先完成此消息的编辑!
想要评论请 注册