提交 38b2db60 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test: 优化页面生命周期示例兼容 safari

上级 3e8e256e
...@@ -32,7 +32,8 @@ describe('page-lifecycle', () => { ...@@ -32,7 +32,8 @@ describe('page-lifecycle', () => {
await page.callMethod('pageSetLifeCycleNum', 0) await page.callMethod('pageSetLifeCycleNum', 0)
}) })
it('onPageScroll onReachBottom', async () => { it('onPageScroll onReachBottom', async () => {
await program.pageScrollTo(2000) await program.pageScrollTo(2000)
await page.waitFor(1000)
const isScrolled = await page.callMethod('getIsScrolled') const isScrolled = await page.callMethod('getIsScrolled')
expect(isScrolled).toBe(true) expect(isScrolled).toBe(true)
lifeCycleNum = await page.callMethod('getLifeCycleNum') lifeCycleNum = await page.callMethod('getLifeCycleNum')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册