helen / wp-style-guide

Still not really a real thing. Also more of a pattern library.
327 stars 34 forks source link

Introduce Visual Regression Testing #13

Closed jonbellah closed 9 years ago

jonbellah commented 9 years ago

This is not 100% code coverage. However, this branch does set up Grunt and PhantomCSS, as well as some baseline tests, for the Pattern Library.

In order to pass your local environment, run $ grunt test --url=http://mysite.dev - once this command is run, a hidden file will be generated, saving the variable for future use; allowing you to use $ grunt test on subsequent runs.

If, on the first run, no --url flag is passed, PhantomCSS will default to http://local.wordpress.dev

There is still work to be done on improving the tests, but this PR gets us that much closer.

My next steps will be to improve test documentation, as well as overall test coverage (and making the tests a bit more robust with click events and such).

Note: this also uses a hardcoded default user/pass. This, too, will be a priority in my next PR.