1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
- const isMP = platformInfo.startsWith('mp')
- const isWeb = platformInfo.startsWith('web')
- describe('issue-16162', () => {
- if (isMP || isWeb) {
- it('skip', () => {
- expect(1).toBe(1)
- })
- return
- }
- let page
- beforeAll(async () => {
- page = await program.reLaunch('/pages/component/list-view/issue-16126')
- await page.waitFor(600)
- })
- it('issue16934', async () => {
- await page.callMethod('setScrollTop', 2000)
- await page.waitFor(2000)
- await page.setData({
- 'intoview': 'item1'
- })
- await page.waitFor(600)
- const scrollTop = await page.callMethod('getScrollTop')
- expect(scrollTop).toBe(0)
- })
- it('issue16162', async () => {
- await page.waitFor(1000);
- // 模拟滑动
- await program.swipe({
- startPoint: {x: 50,y: 300},
- endPoint: {x: 50,y: 0},
- duration: 100
- })
- await page.waitFor(500)
- // 模拟滑动
- await program.swipe({
- startPoint: {x: 50,y: 300},
- endPoint: {x: 50,y: 0},
- duration: 100
- })
- await page.waitFor(500)
- await page.callMethod('changeSize')
- await page.waitFor(500)
- // 模拟滑动
- await program.swipe({
- startPoint: {x: 50,y: 300},
- endPoint: {x: 50,y: 0},
- duration: 100
- })
- await page.waitFor(500)
- // 模拟滑动
- await program.swipe({
- startPoint: {x: 50,y: 150},
- endPoint: {x: 50,y: 400},
- duration: 100
- })
- await page.waitFor(500)
- const image = await program.screenshot({
- fullPage: true
- })
- expect(image).toSaveImageSnapshot()
- })
- })
|