Files
cypress/npm/react/examples/visual-testing-with-applitools

example: visual testing using Applitools

An example using Applitools to visually check React charts made with the Victory library.

Screenshot

See src/Chart.spec.js

Usage

  1. Make sure the root project has been built .
# in the root of the project
npm install
npm run build
  1. Run npm install in this folder to symlink the @cypress/react dependency.
# in this folder
npm install
  1. Start Cypress
npm run cy:open
# or just run headless tests
npm test

Notes

The cy.eyes* commands are ignored during local interactive run. On CI, the cy.eyes* send the snapshots to Applitools servers to be analyzed and compared against the baseline images.

Test result

For more information, see Applitools tutorial.

If there is a difference in visual output, Applitools catches it and fails the test run. The Applitools Dashboard then allows you to review the changes, determine the root cause for the change, and maybe approve the visual changes to update the baseline images.

Applitools difference view