garris/BackstopJS

Backstop js give false result when greyed out or * iteam are missing on UI

Opened this issue · 0 comments

I have a reference image where a few labels are marked as mandatory with * and a few Radio buttons with default values selected.
I took the reference and then made changes in the HTML code, removed * for one mandatory filed and removed the default radio button selection.

then ran the test, the test was marked as pass and I can see in the screenshot, that the reference and test images are different.

see the attached screenshot for more details.

backstop.json
`{
"id": "My_Portal",
"viewports": [

{
  "label": "desktop",
  "width": 1920,
  "height": 900
}

],
"onBeforeScript": "puppet/onBefore.js",
"onReadyScript": "puppet/onReady.js",
"scenarioDefaults": {
"readySelector": "",
"onReadyScript": "customScripts/acceptCookies.js",
"delay": 5000,
"hideSelectors": [],
"removeSelectors": [],
"hoverSelector": "",
"clickSelector": "",
"postInteractionWait": 1000,
"selectors": [],
"selectorExpansion": true,
"misMatchThreshold" : 0.1,
"requireSameDimensions": true
},

"scenarios": [

{
  "label": "SomtingCreatePage  MissingFieldElementsTest",
  "cookiePath": "backstop_data/engine_scripts/cookies.json",
  "url": "https://localhost:4200/mytestpage/UI/Create",         
  "delay": 5000,
  "readySelector":".tagLabeldiv",
  "misMatchThreshold" : 0.1,
  "requireSameDimensions": true
}

],
"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": ["browser"],
"engine": "puppeteer",
"engineOptions": {
"args": ["--no-sandbox"]
},
"asyncCaptureLimit": 15,
"asyncCompareLimit": 50,
"debug": true,
"debugWindow": true
}
`
For security purposes, I hide some labels and other details
Screenshot 2024-07-15 at 7 23 30 PM