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

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

  beforeAll(async () => {
    page = await program.navigateTo(PAGE_PATH)
8
    await page.waitFor('view')
9
  })
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
  it("ref", async () => {
    const button = await page.$(".btn-ref");
    await button.tap();
23
    await page.waitFor(500);
DCloud-WZF's avatar
DCloud-WZF 已提交
24 25 26
    const image = await program.screenshot();
    expect(image).toMatchImageSnapshot();
  });
27
})