UNPKG

@o3world/backstopjs

Version:

A commandline utility and node server to assist in creating drupal backstop tests

76 lines (73 loc) 1.87 kB
module.exports = { testUrl: "https://o3world.com", referenceUrl: "https://dev-o3-world.pantheonsite.io", // these inherit default settings above pathsToTest: { "Homepage": "/", }, // settings to apply to simple "pathsToTest" scenarios defaultScenarioSettings: { // use either to remove pesky elements that are always changing hideSelectors: [], removeSelectors: [], selectorExpansion: true, selectors: [ "document" ], readyEvent: null, // amount of time to wait for page before taking screenshot delay: 5500, // raise if test is too sensitive misMatchThreshold: 0.1 }, // for custom scenarios // enter url without domain e.g. /my-page customScenarios: [ { "label": "About dropdown", "url": "", "referenceUrl": "", "delay": 5000, "misMatchThreshold": "0.5", // hover over first navigation menu item "hoverSelector": ".site-navigation__item--dropdown:nth-of-type(1)", "postInteractionWait": 2000 } ], backstopConfig: { id: "test", onBeforeScript: "puppet/onBefore.js", onReadyScript: "puppet/onReady.js", // define multiple screen sizes viewports: [ { label: "tablet", width: 1024, height: 768 } ], // leave blank scenarios: [], paths: { "bitmaps_reference": "backstop_data/bitmaps_reference", "bitmaps_test": "backstop_data/bitmaps_test", "html_report": "backstop_data/html_report", "ci_report": "backstop_data/ci_report", "engine_scripts": "engine_scripts" }, report: [ "browser", "CI" ], "engine": "puppeteer", "engineOptions": { "args": [ "--no-sandbox" ] }, "asyncCaptureLimit": 5, "asyncCompareLimit": 25, "debug": false, "debugWindow": false } }