list-news.test.js 582 字节
Newer Older
1 2 3
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/

describe('template-list-news', () => {
雪洛's avatar
雪洛 已提交
4 5 6 7 8 9
  if (process.env.uniTestPlatformInfo.startsWith('web')) {
    it('dummyTest', async () => {
      expect(1).toBe(1)
    })
    return
  }
10 11 12 13 14 15 16 17 18 19 20 21 22
  let page;
  beforeAll(async () => {
    page = await program.reLaunch('/pages/template/list-news/list-news');
    await page.waitFor(3000);
  });

  it('screenshot', async () => {
    const image = await program.screenshot({
      fullPage: true
    })
    expect(image).toMatchImageSnapshot()
  });
});