fffunction / backstop-crawl

🕷 Crawls a site to generate a backstopjs config file with scenarios pre-populated
38 stars 18 forks source link

Override specific scenarios via template? #30

Open ghost opened 4 years ago

ghost commented 4 years ago

I need to use backstop-crawl to regenerate my test senarios from time to time.

This is my backstop.template.json

{
  "viewports": [
    {
      "label": "phone",
      "width": 320,
      "height": 480
    },
    {
      "label": "tablet",
      "width": 1024,
      "height": 768
    },
    {
      "name": "desktop",
      "width": 1440,
      "height": 900
    }
  ],
  "defaultScenario": {
    "label": "",
    "url": "",
    "referenceUrl": "",
    "selectors": ["document"],
    "hideSelectors": [],
    "delay": 1500,
    "misMatchThreshold": 0.1
  },
  "scenarios": [],
  "paths": {
    "bitmaps_reference": "backstop_data/bitmaps_reference",
    "bitmaps_test": "backstop_data/bitmaps_test",
    "casper_scripts": "backstop_data/casper_scripts",
    "html_report": "backstop_data/html_report",
    "ci_report": "backstop_data/ci_report"
  },
  "casperFlags": [],
  "engine": "puppeteer",
  "report": ["browser"],
  "debug": false
}

I know that a handful of my scenarios fail unless I up the delay to 3000 instead of 1500.

Is it possible to modify this template in some way so that when I run backstop crawl and generate my backstop.js, those cases use a different delay value than the default?