general-attribute.test.js 791 字节
Newer Older
1
const PAGE_PATH = '/pages/component/general-attribute/general-attribute'
2 3 4 5 6 7 8 9

describe('general attribute', () => {
  let page

  beforeAll(async () => {
    page = await program.navigateTo(PAGE_PATH)
    await page.waitFor(1000)
  })
DCloud-WZF's avatar
DCloud-WZF 已提交
10 11 12 13
  it("class & style", async () => {
    const image = await program.screenshot();
    expect(image).toMatchImageSnapshot();
  });
14
  it('validateGeneralAttributes', async () => {
DCloud-WZF's avatar
DCloud-WZF 已提交
15
    const button = await page.$(".btn-style");
16
    await button.tap()
17 18
    const btnInner = await page.$('.btn-inner')
    expect(await btnInner.text()).toBe('基础属性验证成功')
19
  })
DCloud-WZF's avatar
DCloud-WZF 已提交
20 21 22 23 24 25
  it("ref", async () => {
    const button = await page.$(".btn-ref");
    await button.tap();
    const image = await program.screenshot();
    expect(image).toMatchImageSnapshot();
  });
26
})