Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

Commit

Permalink
docs for ignore regions
Browse files Browse the repository at this point in the history
  • Loading branch information
amitzur committed Jun 24, 2019
1 parent 60debd8 commit 8fbe2a5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -268,6 +268,7 @@ if (isRTL) {
document.documentElement.setAttribute('dir', 'rtl')
}

// 2 visual tests will be created - one for LTR and one for RTL
storiesOf('Components that support RTL', module)
.add(
'Some story',
Expand All @@ -279,6 +280,25 @@ storiesOf('Components that support RTL', module)
)
```

### `ignore`

A single or an array of regions to ignore when checking for visual differences. For example:

```js
storiesOf('Components with ignored region', module)
.add(
'Some story',
() => <div>
<span>I am visually perfect!<span>
<span className="ignore-this">this should be ignored</span>
</div>,
{eyes: {
ignore: [{selector: '.ignore-this'}]
}}
)
});
```

## Running Eyes-Storybook in Docker

When running the SDK in docker, there might be issues related to properly launching the internal chrome browser via puppeteer. If you seem to have such issues, set `runInDocker: true` in your config file. This will pass the internal chrome browser special arguments, as described [here](https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#tips).
Expand Down

0 comments on commit 8fbe2a5

Please sign in to comment.