nested-scroll-body.test.js 732 字节
Newer Older
1
describe('component-native-nested-scroll-body', () => {
2 3 4 5 6
  if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
    it('dummyTest', () => {
      expect(1).toBe(1)
    })
    return
7
  }
8 9

  let page
10
  beforeAll(async () => {
11 12 13
    //打开lnested-scroll-body测试页
    page = await program.reLaunch('/pages/component/nested-scroll-body/nested-scroll-body')
    await page.waitFor(600)
14 15 16 17 18 19
  })

  //检测横向scroll_into_view属性赋值
  it('check_scroll_into_view_left', async () => {
    await page.callMethod('testBodyScrollBy', 400)
    await page.waitFor(300)
20
    const image = await program.screenshot({fullPage: true});
21 22
    expect(image).toSaveImageSnapshot();
  })
23
})