puppeteer-screenshot.d.ts 1015 B

123456789101112131415161718192021222324252627
  1. import type { E2EProcessEnv, ScreenshotOptions } from '@stencil/core/internal';
  2. import type * as puppeteer from 'puppeteer';
  3. import type * as pd from './puppeteer-declarations';
  4. export declare function initPageScreenshot(page: pd.E2EPageInternal): void;
  5. export declare function pageCompareScreenshot(page: pd.E2EPageInternal, env: E2EProcessEnv, desc: string, testPath: string, opts: ScreenshotOptions): Promise<{
  6. id: string;
  7. desc: string;
  8. imageA: string;
  9. imageB: string;
  10. mismatchedPixels: number;
  11. device: string;
  12. userAgent: string;
  13. width: number;
  14. height: number;
  15. deviceScaleFactor: number;
  16. hasTouch: boolean;
  17. isLandscape: boolean;
  18. isMobile: boolean;
  19. allowableMismatchedPixels: number;
  20. allowableMismatchedRatio: number;
  21. testPath: string;
  22. cacheKey: string | undefined;
  23. }>;
  24. export declare function createPuppeteerScreenshotOptions(opts: ScreenshotOptions, { width, height }: {
  25. width: number;
  26. height: number;
  27. }): puppeteer.ScreenshotOptions;