@@ -33,7 +33,7 @@ Then use the cypress image diff command to take screenshots of pages or elements
33
33
34
34
### Take screenshot and compare of the whole page
35
35
36
- ```
36
+ ``` js
37
37
describe (' Visuals' , () => {
38
38
it (' should compare screenshot of the entire page' , () => {
39
39
cy .visit (' www.google.com' )
@@ -44,7 +44,7 @@ describe('Visuals', () => {
44
44
45
45
You can also make the comparison assertion more flexible by applying a higher threshold (default is 0):
46
46
47
- ```
47
+ ``` js
48
48
describe (' Visuals' , () => {
49
49
it (' should compare screenshot of the entire page' , () => {
50
50
cy .visit (' www.google.com' )
@@ -55,7 +55,7 @@ describe('Visuals', () => {
55
55
56
56
### Take screenshot and compare an element
57
57
58
- ```
58
+ ``` js
59
59
describe (' Visuals' , () => {
60
60
it (' should compare screenshot from a given element' , () => {
61
61
cy .visit (' www.google.com' )
@@ -88,7 +88,7 @@ Folder structure is hard coded (see below). There will be enhancements coming in
88
88
89
89
In order to force the screenshot resolution when running a test you will need to set the following environment variables:
90
90
91
- ```
91
+ ``` js
92
92
export HEIGHT = 2240 // Default is set to 1280
93
93
export WIDTH = 1980 // Default is set to 720
94
94
```
0 commit comments