Skip to content

Add config for disabling the auto snapshot before the test #13

@hepiyellow

Description

@hepiyellow

The problem

In wix-style-react with use an autoExample (and driver).
The auto example renders a default component to the page.
It renders the same component with the same props every time the page is loaded.
Then, in each e2e test we set the props remotely (it re-renders the component).
And we can assert (expect) on whatever, and have a 'end' snapshot.

The 'before' snapshots will all look the same.
So it is redundant, and creates redundant review work with applitools.

Solution

I thought to add a config to eyes, something like:

{
  beforeSnapshotEnabled: boolean, // default true
  afterSnapshotEnabled: boolean // default true
}

This config will be global (since eyes.it exports a singleton of eyes),
and in order to make the config temporary (local to an it or describe), we'll need to use before and after to apply/revert a config.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions