forked from patternfly/patternfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
backstop.js
53 lines (50 loc) · 1.43 KB
/
backstop.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
const config = require('./backstop.config');
const scenarios = [];
const viewports = [];
config.relativeUrls.map(relativeUrl => {
const url = (relativeUrl.url || relativeUrl);
const fullUrl = `${config.baseUrl}${url}`;
return scenarios.push({
label: url,
url: fullUrl,
delay: (relativeUrl.delay || 100), // a small timeout allows wiggle room for the page to fully render. increase as needed if you're getting rendering related false positives.
readySelector: '.ws-theme-switch-full-page',
removeSelectors: ['.ws-theme-switch-full-page'],
misMatchThreshold: 0.1
})
});
Object.keys(config.viewports).map(viewport => (
viewports.push({
name: viewport,
width: config.viewports[viewport].width,
height: config.viewports[viewport].height
})
));
module.exports = {
id: 'pf-core',
viewports,
scenarios,
onReadyScript: 'puppet/onReady.js',
report: ['browser'],
engine: 'puppeteer',
engineOptions: {
headless: 'new',
args: [
'--no-sandbox',
'--disable-setuid-sandbox'
]
},
paths: {
bitmaps_reference: 'backstop_data/bitmaps_reference',
bitmaps_test: 'backstop_data/bitmaps_test',
engine_scripts: 'backstop_data/engine_scripts',
html_report: 'backstop_data/html_report',
ci_report: 'backstop_data/ci_report'
},
asyncCaptureLimit: 5,
asyncCompareLimit: 50,
debug: false,
debugWindow: false,
archiveReport: false,
scenarioLogsInReports: false
};