From 135f1df3463c448100008b3736f8a3d1fd3bdb98 Mon Sep 17 00:00:00 2001 From: taohebin Date: Fri, 24 May 2024 17:07:40 +0800 Subject: [PATCH] =?UTF-8?q?test:=20uploadFile=20uni.env=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/upload-file/upload-file.test.js | 11 +++- pages/API/upload-file/upload-file.uvue | 67 +++++++++++++++-------- 2 files changed, 55 insertions(+), 23 deletions(-) diff --git a/pages/API/upload-file/upload-file.test.js b/pages/API/upload-file/upload-file.test.js index 2789b9e9..69742c3f 100644 --- a/pages/API/upload-file/upload-file.test.js +++ b/pages/API/upload-file/upload-file.test.js @@ -34,6 +34,13 @@ describe('ExtApi-UploadFile', () => { await page.waitFor(2000); res = await page.data('jest_result'); expect(res).toBe(true) + }); + + it('Check uni.env', async () => { + await page.callMethod('jest_uploadFile_with_uni_env'); + await page.waitFor(2000); + res = await page.data('jest_result'); + expect(res).toBe(true); }); // 15以下的模拟器所对应的xcode不能编译自定义插件 @@ -47,7 +54,9 @@ describe('ExtApi-UploadFile', () => { 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) { diff --git a/pages/API/upload-file/upload-file.uvue b/pages/API/upload-file/upload-file.uvue index 8878c521..180768a8 100644 --- a/pages/API/upload-file/upload-file.uvue +++ b/pages/API/upload-file/upload-file.uvue @@ -15,13 +15,13 @@ -