提交 7cf2a3e0 编写于 作者: DCloud_iOS_XHY's avatar DCloud_iOS_XHY

slider 添加模拟点击测试例

上级 08c232cb
......@@ -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)
})
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册