global-properties.test.js 852 B

123456789101112131415161718192021222324252627
  1. const PAGE_PATH = '/pages/component/global-properties/global-properties'
  2. describe('general attribute', () => {
  3. let page
  4. beforeAll(async () => {
  5. page = await program.navigateTo(PAGE_PATH)
  6. await page.waitFor('view')
  7. })
  8. it("class & style", async () => {
  9. const image = await program.screenshot({fullPage: true});
  10. expect(image).toSaveImageSnapshot();
  11. });
  12. it('validateGeneralAttributes', async () => {
  13. const button = await page.$(".btn-style");
  14. await button.tap()
  15. const btnInner = await page.$('.btn-inner')
  16. expect(await btnInner.text()).toBe('基础属性验证成功')
  17. })
  18. it("ref", async () => {
  19. const button = await page.$(".btn-ref");
  20. await button.tap();
  21. await page.waitFor(500);
  22. const image = await program.screenshot({fullPage: true});
  23. expect(image).toSaveImageSnapshot();
  24. });
  25. })