From 0c8e97ba3438044c53419689deb353dd2a435cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Thu, 27 Jun 2024 15:24:29 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20test:=20overflow-visible-event=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8B=96=E6=8B=BD=E6=B5=8B=E8=AF=95=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../overflow/overflow-visible-event.test.js | 34 +-- .../CSS/overflow/overflow-visible-event.uvue | 202 ++++++------------ 2 files changed, 70 insertions(+), 166 deletions(-) diff --git a/pages/CSS/overflow/overflow-visible-event.test.js b/pages/CSS/overflow/overflow-visible-event.test.js index 3d7af0ee..2fe4071c 100644 --- a/pages/CSS/overflow/overflow-visible-event.test.js +++ b/pages/CSS/overflow/overflow-visible-event.test.js @@ -23,43 +23,13 @@ describe('/pages/CSS/overflow/overflow-visible-event.uvue', () => { }) }); - it('Check Overflow Visible Part Click', async () => { + it('Check Overflow Visible Part Click', async () => { res = await page.callMethod('jest_getRect') const point_x = await page.data('jest_click_x'); const point_y = await page.data('jest_click_y'); await program.adbCommand("input tap" + " " + point_x + " " + point_y) - await page.waitFor(500); - res = await page.data('jest_result'); - expect(res).toBe(true) - }); - - // 此测试针对开发者使用 translate 移动view - it('Check Overflow Visible Part Use translate Drag', async ()=> { - await page.callMethod('jest_getRect') - const point_x = await page.data('jest_click_x'); - const point_y = await page.data('jest_click_y'); - const distance = 100; - const destY = point_y + 100 - const duration = 1000 - await program.adbCommand("input swipe" + " " + point_x + " " + point_y + " " + point_x + " " + destY + " " + duration) - await page.waitFor(1500); - await page.callMethod('jest_getParentRect') - const currentParentTop = await page.data('jest_parent_top'); - const offset = 2 - const diff = Math.abs(currentParentTop - distance) < offset - console.log("current ", currentParentTop); - console.log("diff", diff); - expect(diff).toBe(true) - }) - - it('Check Overflow Visible Block View Click', async () => { - await page.callMethod('jest_getAbsoluteViewRect') - const point_x = await page.data('jest_click_x'); - const point_y = await page.data('jest_click_y'); - console.log("input tap" + " " + point_x + " " + point_y); - await program.adbCommand("input tap" + " " + point_x + " " + point_y) await page.waitFor(500); res = await page.data('jest_result'); expect(res).toBe(true) - }) + }); }); diff --git a/pages/CSS/overflow/overflow-visible-event.uvue b/pages/CSS/overflow/overflow-visible-event.uvue index 5ae85d83..fcf55189 100644 --- a/pages/CSS/overflow/overflow-visible-event.uvue +++ b/pages/CSS/overflow/overflow-visible-event.uvue @@ -1,137 +1,71 @@ - - - - - -- GitLab