提交 af63a882 编写于 作者: DCloud_iOS_WZT's avatar DCloud_iOS_WZT

test: swiper测试用例更新

上级 61af97d7
......@@ -29,42 +29,24 @@ describe('test swiper', () => {
*/
});
it('check autoplay loop', async () => {
// iOS平台此测试用例 等待时长不准确 导致用例过不了
if (!process.env.uniTestPlatformInfo.startsWith('IOS_SIMULATOR')) {
await page.setData({
autoplaySelect: true,
currentValChange: 0,
})
await page.waitFor(600)
expect(await getData('currentValChange')).toEqual(0)
await page.waitFor(1600)
expect(await getData('currentValChange')).toEqual(1)
await page.waitFor(2000)
expect(await getData('currentValChange')).toEqual(2)
await page.waitFor(2000)
expect(await getData('currentValChange')).toEqual(0)
await page.setData({
circularSelect: true,
currentValChange: 0,
})
await page.waitFor(600)
expect(await getData('currentValChange')).toEqual(0)
await page.waitFor(1600)
expect(await getData('currentValChange')).toEqual(1)
await page.waitFor(2000)
expect(await getData('currentValChange')).toEqual(2)
await page.waitFor(2000)
expect(await getData('currentValChange')).toEqual(0)
await page.setData({
circularSelect: false,
autoplaySelect: false
})
await page.waitFor(300)
}
it('check autoplay loop', async () => {
await page.setData({
currentValChange: 0,
autoplaySelect: true,
})
await page.waitFor(2400)
expect(await getData('currentValChange')).toEqual(1)
await page.waitFor(2000)
expect(await getData('currentValChange')).toEqual(2)
await page.waitFor(2000)
expect(await getData('currentValChange')).toEqual(0)
await page.setData({
autoplaySelect: false
})
await page.waitFor(300)
});
it('check current', async () => {
await page.setData({
currentVal: 2,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册