font-family-icon.test.js 929 B

12345678910111213141516171819202122232425262728293031323334
  1. describe('css-font-family-icon', () => {
  2. const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase();
  3. const isMP = platformInfo.startsWith('mp');
  4. const isWeb = platformInfo.startsWith('web');
  5. const isAppWebView = process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true';
  6. let page;
  7. if (isWeb || isMP || isAppWebView) {
  8. it('other platform', () => {
  9. expect(1).toBe(1);
  10. });
  11. return;
  12. }
  13. it('screenshot', async () => {
  14. page = await program.reLaunch('/pages/CSS/text/font-family-icon');
  15. await page.waitFor('view');
  16. const image = await program.screenshot({
  17. fullPage: true
  18. });
  19. expect(image).toSaveImageSnapshot();
  20. });
  21. it('screenshot after changeStyle', async () => {
  22. await page.callMethod('changeStyle');
  23. await page.waitFor(500);
  24. const image = await program.screenshot({
  25. fullPage: true
  26. });
  27. expect(image).toSaveImageSnapshot();
  28. });
  29. });