Skip to content

Commit

Permalink
Merge pull request #39 from uktrade/feature/update-default-viewport
Browse files Browse the repository at this point in the history
feat: update default viewport size
  • Loading branch information
PippoRaimondi authored Sep 1, 2021
2 parents 2dbc367 + 38bb619 commit 428b8e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ Folder structure is hard coded (see below). There will be enhancements coming in
In order to force the screenshot resolution when running a test you will need to set the following environment variables:

```js
export HEIGHT=2240 // Default is set to 1280
export WIDTH=1980 // Default is set to 720
export HEIGHT=1980 // Default is set to 1440
export WIDTH=2240 // Default is set to 1980
```

### Please notice
Expand Down
4 changes: 2 additions & 2 deletions src/command.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const compareSnapshotCommand = defaultScreenshotOptions => {
const height = process.env.HEIGHT || '1280'
const width = process.env.WIDTH || '720'
const height = process.env.HEIGHT || '1440'
const width = process.env.WIDTH || '1980'

// Force screenshot resolution to keep consistency of test runs across machines
Cypress.config('viewportHeight', height)
Expand Down

0 comments on commit 428b8e6

Please sign in to comment.