-
Notifications
You must be signed in to change notification settings - Fork 668
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
Visual Regression tests doc issues #1508
Comments
@ronyeh -- putting this here for anyone who searches this as I did. I'm pretty sure the way I got it to work is not the happiest path, or I'd update the docs myself, but it will work:
Note that if you run |
Thanks for reporting these issues. We definitely need to make this version easier to test. Will look into it! Just to clarify: This is for when you want to contribute something new or tweak the visuals, but want to quickly see how your changes affect the current main revision. Ideally you can do something like:
And it'll do all the required steps to compare your current repo against the master/main revision. But for now, it would be nice to figure out the exact minimal sequence of npm run / grunt commands to run to get a visual comparison. |
Hi @gristow and @mscuthbert Thanks for pointing out these issues. We definitely need to update the wiki docs with the current process for doing visual diffs. In the Gruntfile.js there is this option:
The npm script has the same name.
This will back up the reference images before running the build (which deletes the reference images 👎 ). After the build completes, it restores the reference images before running the visual diff. I am sure there is a better way to do this, which might involve being more careful about NOT deleting reference images. |
Added some more NPM scripts: |
Here's one path to do visual regression testing against a release that is hosted on NPM. # Work on a crazy new feature.
git branch crazy-clef
... write some code to make clefs 3X bigger ...
# Build the current version.
grunt
# Do a visual comparison against the version 4.2.2 release.
# Download the release from npm.
grunt get:releases:4.2.2
grunt generate:current
grunt generate:release:4.2.2
grunt diff:ver:4.2.2 RIght now, it generates the before & after PNGs. There seems to be a bug with producing the actual diff images... so we will have to investigate that. |
Issue on: https://github.com/0xfe/vexflow/wiki/Visual-Regression-Tests
There does not seem to be an 'npm run generate' command -- there are however various gruntfile commands. Not sure the exact best order to run.
The text was updated successfully, but these errors were encountered: