Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in state of checkbox or radio button not being detected as a mismatch #228

Open
ecastor opened this issue Feb 27, 2024 · 0 comments

Comments

@ecastor
Copy link

ecastor commented Feb 27, 2024

The page I am testing has a check box. On my base image the checkbox is ticked, then on my script I unticked the checkbox then executed a visual test. The problem is it passed and it wasn't able to detect the difference in the checkbox.

I am sure that my folder configuration is correct, since I tried changing a large chunk of elements in the page and it detects the mismatch on it.

I am currently using CodeceptJS - Playwright and I used ResemblerJS as a plugin for my visual testing.

Versions:

"codeceptjs": "^3.4.1"
"codeceptjs-resemblehelper": "^1.9.7"

codecept.conf.js

helpers: {
   ResembleHelper: {
      require: "codeceptjs-resemblehelper",
      screenshotFolder: "./output/screenshots",
      baseFolder: "./visual-test/base/",
      diffFolder: "./visual-test/diff/",
      prepareBaseImage: false
    }
}

script.js

Scenario("Navigate to page", ({ I }) => {
  I.amOnPage("https://formstone.it/components/checkbox/");
  I.wait(5);
  I.saveScreenshot("VT-Checkbox.png");
  I.seeVisualDiff("VT-Checkbox.png", { prepareBaseImage: true, tolerance: 1 });

  I.click("//input[@id='checkbox-1']/parent::div");
  I.click("//input[@id='radio-2']/parent::div")
  I.saveScreenshot("VT-Checkbox.png");
  I.seeVisualDiff("VT-Checkbox.png", { prepareBaseImage: false, tolerance: 1 });
});
@ecastor ecastor changed the title Difference in state of checkbox not being detected as a mismatch Difference in state of checkbox or radio button not being detected as a mismatch Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant