sticky-header.test.js 647 字节
Newer Older
shutao-dc's avatar
shutao-dc 已提交
1
describe('component-native-sticky-header', () => {
DCloud-WZF's avatar
DCloud-WZF 已提交
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
  if (process.env.uniTestPlatformInfo.startsWith('android')) {
    let page
    beforeAll(async () => {
      page = await program.reLaunch('/pages/component/sticky-header/sticky-header')
      await page.waitFor('sticky-header')
    })

    //检测吸顶效果
    it('check_sticky_header', async () => {
      await page.callMethod('confirm_scroll_top_input', 600)
      const image = await program.screenshot();
      expect(image).toMatchImageSnapshot();
    })
  } else {
    // TODO: web 端暂不支持
    it('web', async () => {
      expect(1).toBe(1)
    })
  }
})