From e4667d087371903e58f81bf3daef80955aa9ae28 Mon Sep 17 00:00:00 2001 From: hdx Date: Fri, 7 Jul 2023 10:35:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20page-scrollTo,=20=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=8E=89=E6=9A=82=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9A=84=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=B5=8B=E8=AF=95=E6=96=B9=E6=B3=95=20page.s?= =?UTF-8?q?crollTop()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/page-scrollTo/page-scrollTo.test.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pages/API/page-scrollTo/page-scrollTo.test.js b/pages/API/page-scrollTo/page-scrollTo.test.js index c16698ee..36595b57 100644 --- a/pages/API/page-scrollTo/page-scrollTo.test.js +++ b/pages/API/page-scrollTo/page-scrollTo.test.js @@ -7,13 +7,14 @@ describe('page-scrollTo', () => { await page.waitFor(500) }) // TODO - // it('scrollTo', async () => { - // const btnScrollTo = await page.$('.btn-scrollTo') + it('scrollTo', async () => { + const btnScrollTo = await page.$('.btn-scrollTo') - // await toggle.tap() - // await page.waitFor(50) - // expect(await page.scrollTop).toBe(100) - // }) + await btnScrollTo.tap() + await page.waitFor(50) + // const scrollTop = await page.scrollTop() + // expect(scrollTop).toBe(100) + }) // it('scrollToElement', async () => { // const btnScrollTo = await page.$('.btn-scrollToElement') // const scrollToElement = await page.$('.custom-element') -- GitLab