From cf5db1bb444cfa62ad553b4b9931b240f124cba5 Mon Sep 17 00:00:00 2001 From: mahaifeng Date: Sat, 12 Oct 2024 15:25:23 +0800 Subject: [PATCH] =?UTF-8?q?[opentype]=E5=88=A0=E6=8E=89=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/open-type/open-type.test.js | 43 ---------------- pages/component/open-type/open-type.uvue | 56 --------------------- 2 files changed, 99 deletions(-) delete mode 100644 pages/component/open-type/open-type.test.js delete mode 100644 pages/component/open-type/open-type.uvue diff --git a/pages/component/open-type/open-type.test.js b/pages/component/open-type/open-type.test.js deleted file mode 100644 index 344a9c44..00000000 --- a/pages/component/open-type/open-type.test.js +++ /dev/null @@ -1,43 +0,0 @@ -let page; -describe('open-type', () => { - if (!isAndroid()) { - // TODO: web 端暂不支持测试 - it('web', async () => { - expect(1).toBe(1) - }) - return - } - beforeAll(async () => { - page = await program.reLaunch('/pages/component/open-type/open-type') - await page.waitFor(600); - }); - it('opentype-test', async () => { - if (!isAndroid()) { - return - } - const opentype = await page.$('#opentype') - await opentype.tap() - let isAgreeRes = await getData('isAgreeRes') - expect(isAgreeRes).toBe(true) - }) - - function isAndroid() { - if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW === - 'true') { - expect(1).toBe(1) - return false - } - if (process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('ios')) { - expect(1).toBe(1) - return false - } - return true - } - - function getData(key = '') { - return new Promise(async (resolve, reject) => { - const data = await page.data() - resolve(key ? data[key] : data) - }) - } -}); diff --git a/pages/component/open-type/open-type.uvue b/pages/component/open-type/open-type.uvue deleted file mode 100644 index 918c62b3..00000000 --- a/pages/component/open-type/open-type.uvue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -- GitLab