-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Tried an approch for text case in pixelmatch #7552
base: dev-2.0
Are you sure you want to change the base?
Conversation
Thanks @Vaivaswat2244, nice approach! I have a few questions that might help us determine how to get this across the finish line.
|
yeah sure, the text() passing makes much more sense. I can implement that. |
hey, so I just noticed that the files which I added in the earlier commit aren't the one which are failing the tests on CI, but they are other files which were not touched. Now, I changed the files which were failing tests in CI, and tried the tests locally. The tests are now failing for different files in the typography and webgl cases. I guess there is a problem with my changes in the visualtest file. |
Just looking at the last failure in the test file: ...it looks like a few isolated pixels are off. I wonder if we can do something to augment pixelmatch and check if the difference exists just on a single pixel (so no surrounding pixels are also flagged) and then ignore those? |
Resolves #7496
Changes:
Modified the
checkMatch
function invisualtest.js
to be more tolerant of slight text position shifts while still catching meaningful changes. Key changes:Added text detection using pixel pattern analysis:
Implemented shift tolerance for text regions:
shiftThreshold
parameterScreenshots of the change:
PR Checklist
npm run lint
passes