From 7cf2a3e0e196a4dd369f1c6478f1026103a89000 Mon Sep 17 00:00:00 2001 From: XHY Date: Wed, 4 Dec 2024 18:04:02 +0800 Subject: [PATCH] =?UTF-8?q?slider=20=E6=B7=BB=E5=8A=A0=E6=A8=A1=E6=8B=9F?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=B5=8B=E8=AF=95=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/slider/slider-maxValue.test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pages/component/slider/slider-maxValue.test.js b/pages/component/slider/slider-maxValue.test.js index e9879486..1d5939bd 100644 --- a/pages/component/slider/slider-maxValue.test.js +++ b/pages/component/slider/slider-maxValue.test.js @@ -44,5 +44,21 @@ describe('touch-events-test', () => { await page.waitFor(600); const ret = await page.data('sliderValue') expect(ret).toBe(10) + }) + + it('test-slider-click', async () => { + + let iconRect = await page.data('sliderRect') + let x = iconRect.x + 100 + let y = iconRect.y + iconRect.height / 2.0 + + // 点击事件 + await program.tap( + {x: x, y: y} + ) + + await page.waitFor(600); + const ret = await page.data('sliderValue') + expect(ret).toBeLessThan(10) }) }) -- GitLab