function.test.js 520 B

1234567891011121314151617181920
  1. const isAppWebView = process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true'
  2. describe('css-function', () => {
  3. if (isAppWebView) {
  4. // app 与 web 存在差异, webview 不进行截图
  5. it('not support', () => {
  6. expect(1).toBe(1)
  7. })
  8. return
  9. }
  10. it('screenshot', async () => {
  11. const page = await program.reLaunch('/pages/CSS/function/function');
  12. await page.waitFor('view');
  13. const image = await program.screenshot({
  14. fullPage: true
  15. })
  16. expect(image).toSaveImageSnapshot()
  17. });
  18. });