From b873d0b50f9965874844c944f051a589eae53f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Wed, 27 Nov 2024 19:06:23 +0800 Subject: [PATCH] =?UTF-8?q?test(mp):=20=E5=B1=8F=E8=94=BDgetLocation?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-selector-query.test.js | 4 +++- pages/API/get-location/get-location.test.js | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pages/API/create-selector-query/create-selector-query.test.js b/pages/API/create-selector-query/create-selector-query.test.js index 061ed490..eb5d72bc 100644 --- a/pages/API/create-selector-query/create-selector-query.test.js +++ b/pages/API/create-selector-query/create-selector-query.test.js @@ -4,7 +4,9 @@ const RECT_LEFT = 15; const RECT_WIDTH = 150; const RECT_HEIGHT = 100; -describe('nodes-info', () => { +describe('nodes-info', () => { + const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() + const isMP = platformInfo.startsWith('mp') let page beforeAll(async () => { page = await program.reLaunch(PAGE_PATH) diff --git a/pages/API/get-location/get-location.test.js b/pages/API/get-location/get-location.test.js index 6c0d72d2..45226400 100644 --- a/pages/API/get-location/get-location.test.js +++ b/pages/API/get-location/get-location.test.js @@ -5,7 +5,15 @@ const isIos = platformInfo.startsWith('ios') const isApp = isAndroid || isIos const isWeb = platformInfo.startsWith('web') -describe("get-location", () => { +describe("get-location", () => { + const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() + const isMP = platformInfo.startsWith('mp') + if(isMP) { + // 微信上会有权限弹框,暂时屏蔽测试 + it('not support', async () => { + expect(1).toBe(1) + }) + } beforeAll(async () => { page = await program.reLaunch(PAGE_PATH) await page.waitFor(600) -- GitLab