This repository has been archived by the owner on Jun 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
wp-new-relic-demo.backstop-config.js
83 lines (75 loc) · 1.81 KB
/
wp-new-relic-demo.backstop-config.js
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
77
78
79
80
81
82
83
'use strict';
const BackstopReferenceBaseUrl = 'https://auto-update-wp-new-relic-demo.pantheonsite.io/';
const BackstopTestUrl = 'https://live-wp-new-relic-demo.pantheonsite.io/';
const simple_scenarios_paths = [
"/top-25",
"/hello-world",
"/product-category/accessories",
"/product-category/action-reflex-games",
"/product-category/action-figures",
"/product/medium-cleaner-kit-plastic",
"/product/hair-red-bikini",
"/product/black-egg",
];
const config = {
"id": "backstop_default",
"viewports": [
{
"name": "phone",
"width": 320,
"height": 480
},
{
"name": "tablet_v",
"width": 568,
"height": 1024
},
{
"name": "tablet_h",
"width": 1024,
"height": 768
},
{
"name": "desktop",
"width": 1920,
"height": 1080
}
],
"scenarios": [
{
"label": "Homepage",
"url": BackstopTestUrl,
"referenceUrl": BackstopReferenceBaseUrl,
"hideSelectors": [],
"selectors": ["document"],
"readyEvent": null,
"delay": 1500,
"misMatchThreshold": 0.1
}
],
"paths": {
"bitmaps_reference": "backstop_data/bitmaps_reference",
"bitmaps_test": "backstop_data/bitmaps_test",
"compare_data": "backstop_data/bitmaps_test/compare.json",
"casper_scripts": "backstop_data/casper_scripts"
},
"engine": "chrome",
"report": [ "CLI" ],
"casperFlags": [],
"debug": false,
"port": 3001
}
const simple_scenarios = simple_scenarios_paths.map(function(path) {
return {
"label": path,
"url": BackstopTestUrl + path,
"referenceUrl":BackstopReferenceBaseUrl + path,
"hideSelectors": [],
"selectors": ["document"],
"readyEvent": null,
"delay": 1500,
"misMatchThreshold": 0.1
}
});
config.scenarios = config.scenarios.concat(simple_scenarios);
module.exports = config;