-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathschema_visual.json
More file actions
76 lines (76 loc) · 2.21 KB
/
schema_visual.json
File metadata and controls
76 lines (76 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"$id": "schema_visual.json",
"title": "Visual config file",
"description": "Contains checks for visual changes by comparing screenshots",
"type": "array",
"items": {
"title": "Visual test object",
"type": "object",
"required": ["name", "path"],
"additionalProperties": false,
"properties": {
"name": {
"description": "Name of the test case",
"type": "string"
},
"path": {
"description": "Pathname to the website page (relative to hostname)",
"type": "string",
"pattern": "^/"
},
"directory": {
"description": "Path to the screenshot dir",
"type": "string",
"default": "./_results/screenshots"
},
"sensitivity": {
"description": "Comparison sensitivity threshold (in float between 0 and 1, larger is more sensitive)",
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 0.9
},
"allowedDifference": {
"description": "Allowed number of different pixels for images to be considered similar (in px)",
"type": "number",
"minimum": 0,
"default": 0
},
"delay": {
"description": "Delay (in ms) to wait after page load and before making the screenshot",
"type": "number",
"minimum": 0,
"default": 0
},
"maxScreenshots": {
"description": "Number of recent screenshots to store. If false, old screenshots will not be deleted",
"oneOf": [
{
"type": "number",
"minimum": 1,
"default": 1
},
{
"type": "boolean",
"const": false
}
]
},
"scrollPage": {
"description": "Whether to automatically scroll to the bottom of the page",
"type": "boolean",
"default": true
},
"createDiffImg": {
"description": "Whether to place the differential png file in the screenshots folder",
"type": "boolean",
"default": false
},
"before": {
"description": "Execute actions before performing the check",
"type": "array",
"items": { "$ref": "schema_before.json" }
}
}
}
}