提交 63457812 编写于 作者: shutao-dc's avatar shutao-dc

update waterflow.test.js

上级 6c2c2cbd
......@@ -32,23 +32,29 @@ describe('component-native-waterflow', () => {
const scrollDetail = await page.data('scrollDetailTest')
// console.log('scrollDetailTest:', scrollDetail)
expect(scrollDetail.scrollLeft).toBe(0)
// scrollTop和deltaY 在安卓端差异 299.8095
// scrollTop和deltaY 在安卓端差异 299.8095
expect(scrollDetail.scrollTop).toBeGreaterThan(299.5)
//expect([300, 299.8095]).toContain(scrollDetail.scrollTop);
expect(scrollDetail.scrollHeight).toBeGreaterThan(0)
expect(scrollDetail.scrollWidth).toBeGreaterThan(0)
expect(scrollDetail.deltaX).toBe(0)
//此处可判断安卓issues:9121的问题
//此处可判断安卓issues:9121的问题
expect(scrollDetail.deltaY).toBeGreaterThan(299.5)
//expect([300.1905, 300, 299.8095]).toContain(scrollDetail.deltaY);
expect(await page.data('isScrollTest')).toBe('scroll:Success')
})
it('Event scrolltolower-滚动到底部/右边',async()=>{
it('Event scrolltolower-滚动到底部/右边',async()=>{
//隐藏加载更多元素
await page.callMethod('change_load_more_boolean', false)
await page.waitFor(600)
// 滚动到底部,是否触发scrolltolower事件
await page.callMethod('confirm_scroll_top_input', 2500)
await page.waitFor(600)
expect(await page.data('isScrolltolowerTest')).toBe('scrolltolower:Success-bottom')
expect(await page.data('isScrolltolowerTest')).toBe('scrolltolower:Success-bottom')
//截图 检测末尾处元素UI展示
const image = await program.screenshot({fullPage: false});
expect(image).toSaveImageSnapshot();
})
it('Event scrolltoupper-滚动到顶部/左边',async()=>{
......@@ -107,9 +113,9 @@ describe('component-native-waterflow', () => {
await page.callMethod('setScrollIntoView', 'item---0')
expect(scrollTop-280).toBeGreaterThanOrEqual(0)
})
}
//检测waterflow属性变化 截图校验
}
//检测waterflow属性变化 截图校验
it('check_waterflow_view_props', async () => {
await page.callMethod('testModifyWaterflowProps')
await page.waitFor(600)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册