0.7.3 • Published 5 years ago

@virtualidentity/medusa v0.7.3

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Medusa 🐍

Medusa is a simple connector to help you use Percy.io with puppeteer in your project.

Installation

npm i @virtualidentity/medusa --save-dev

Usage

To run medusa, you have to have the percy environment values set.

export PERCY_BRANCH=YourBranch
export PERCY_TOKEN=YourToken

Then setup an npm script to run medusa

{
  ...
  "scripts": {
    ...
    "test:regression": "medusa"
  }
  ...
}

Now you are ready and can use it with:
npm run test:regression

Configure

You can configure medusa by passing a configuration file via --config:

medusa --config path/to/config.json

This defaults to medusa.json.

The config file can set the following values:

NameDescriptionDefault
targetDirThe directory where to search for .html files.dist
ignoreFilesFiles to ignore for screenshots.[]
screenWidthsScreen widths to screenshot and send to percy[320]

Hide markup

Medusa brings its own CSS class which helps you to hide elements in the visual regression test. To hide an element just add the class hide-in-medusa to it:

<div class="hide-in-medusa">...</div>

Handle Animations

It's recommended to hide animated components or add them to the ignore list, because it can't be guaranteed that the animations are captured at the same state of animation each time, this causes diffs in the snapshots where really are none.

Different Environments

The simpelest way to have different environments

0.7.3

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago