mmacartney10 / ocularjs

Quicker, more user friendly visual regression testing
7 stars 3 forks source link

Visual regression testing

Faster, more user friendly visual regression testing. Used to tell a developer which components on a website have been affected by code changes, and gives a developer more visibility over a website. Involves three steps:

What is the purpose of Ocularjs

To Run

npm install ocularjs -g
ocularjs init
ocularjs

Ocularjs init

This creates a folder called ocular in the directory in which the command is run. Inside this folder will be a data.json file which is where the settings for the project will be set.

Data.json

{
  "pageUrl": "http://localhost:7000/",
  "viewports": {
    "smallScreen": [320, 480],
    "mediumScreen_landscape": [768, 1024],
    "mediumScreen_portrait": [1024, 768],
    "largeScreen" : [1920, 1080]
  },
  "selectorList": {
    "containerOne": "[data-container-one]",
        "containerTwo": "[data-container-two]"
  }
}

Ocularjs

This will ask the user a question with three options: