@types/happo-cypress
TypeScript icon, indicating that this package has built-in type declarations

4.1.4 • Public • Published

Installation

npm install --save @types/happo-cypress

Summary

This package contains type definitions for happo-cypress (https://github.com/happo/happo-cypress#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/happo-cypress.

index.d.ts

/// <reference types="cypress" />

export interface HappoScreenshotTarget {
    name: string;
    browser: string;
    viewport: string;
}

export interface HappoScreenshotOptions {
    component?: string | undefined;
    variant?: string | undefined;
    targets?: ReadonlyArray<string | HappoScreenshotTarget> | undefined;
    responsiveInlinedCanvases?: boolean | undefined;
    transformDOM?: HappoTransformDOMOptions | undefined;
    includeAllElements?: boolean | undefined;
}

export interface HappoTransformDOMOptions {
    selector: string;
    transform: (element: Element, document: Document) => Element;
}

export interface HappoHideDynamicElementsOptions {
    matchers?: readonly RegExp[] | undefined;
    defaultMatchers?: readonly RegExp[] | undefined;
    selectors?: readonly string[] | undefined;
    defaultSelectors?: readonly string[] | undefined;
    replace?: boolean | undefined;
}

declare global {
    namespace Cypress {
        interface Chainable {
            happoScreenshot(options?: HappoScreenshotOptions): void;
            happoHideDynamicElements(options?: HappoHideDynamicElementsOptions): void;
        }
    }
}

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: cypress

Credits

These definitions were written by Alexander Polyankin, and Mario Beltrán Alarcón.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/happo-cypress

Weekly Downloads

764

Version

4.1.4

License

MIT

Unpacked Size

5.21 kB

Total Files

5

Last publish

Collaborators

  • types