71 lines
1.8 KiB
JavaScript
71 lines
1.8 KiB
JavaScript
/* global process, module */
|
|
const BASE_URL = process.env.TEST_URL || 'http://localhost:3000';
|
|
const REFERENCE_URL = process.env.REFERENCE_URL || 'https://klz-cables.com';
|
|
|
|
module.exports = {
|
|
id: 'klz-cables',
|
|
viewports: [
|
|
{
|
|
label: 'phone',
|
|
width: 375,
|
|
height: 667,
|
|
},
|
|
{
|
|
label: 'tablet',
|
|
width: 768,
|
|
height: 1024,
|
|
},
|
|
{
|
|
label: 'desktop',
|
|
width: 1440,
|
|
height: 900,
|
|
},
|
|
],
|
|
onBeforeScript: 'puppet/onBefore.cjs',
|
|
onReadyScript: 'puppet/onReady.cjs',
|
|
scenarios: [
|
|
{
|
|
label: 'Homepage',
|
|
url: `${BASE_URL}/`,
|
|
referenceUrl: `${REFERENCE_URL}/`,
|
|
readyEvent: '',
|
|
readySelector: '',
|
|
delay: 500,
|
|
hideSelectors: [],
|
|
removeSelectors: [],
|
|
hoverSelector: '',
|
|
clickSelector: '',
|
|
postInteractionWait: 0,
|
|
selectors: [],
|
|
selectorExpansion: true,
|
|
expect: 0,
|
|
misMatchThreshold: 0.1,
|
|
requireSameDimensions: true,
|
|
},
|
|
{
|
|
label: '404 Error Page',
|
|
url: `${BASE_URL}/this-page-does-not-exist`,
|
|
referenceUrl: `${REFERENCE_URL}/this-page-does-not-exist`,
|
|
delay: 500,
|
|
misMatchThreshold: 0.1,
|
|
},
|
|
],
|
|
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',
|
|
},
|
|
report: process.env.CI ? ['CI', 'json'] : ['browser'],
|
|
engine: 'puppeteer',
|
|
engineOptions: {
|
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
|
executablePath: process.env.CHROME_PATH || undefined, // Use explicit Chrome in CI
|
|
},
|
|
asyncCaptureLimit: 5,
|
|
asyncCompareLimit: 50,
|
|
debug: false,
|
|
debugWindow: false,
|
|
};
|