0.3.0
-
CSS Critic now supports testing for :hover and :active styles. A particular selector can be selected like this:
csscritic.add({ url: 'myTestCase.html', active: 'a.selector', hover: 'a.selector' });
-
Difference images are now top aligned and do a better job at showing changes with pages growing in content.
-
CSS Critic is now available over npm which is the preferred way for installation. To include the package just load the module through
./node_modules/csscritic/csscritic.js
.
Bug fixes
- Transparency was incorrectly handled when showing differences (HumbleSoftware/js-imagediff#11).
- When loading test cases over a slow HTTP connection the renderer potentially returned an incomplete page.
API Changes
- The old
compare()
API has silently changed in 0.2.0 and has now been removed. Instead, please useadd()
followed finally byexecute()
. - The reporter API has changed with
pageUrl
being replaced by thetestCase
object andreport()
being renamed toreportTestSuite()
. - In addition callbacks have made way for promises in
execute()
and for reporters. If a reporter needs to run async operations it should return a promise and resolve once done. - See the new API documentation under https://github.com/cburgmer/csscritic/wiki/API.
Known issues
- Diff doesn't show added black colored content (HumbleSoftware/js-imagediff#34).
In the background
- A lot technical dept has been cleaned up with code being pulled out into modules and overall reorganisation of the project.
- A test case is now represented by a HTML page and optionally further parameters, e.g.
hover
. - Switched to promises for async operations.
- The allinone bundle is built using Browserify and does not leak dependencies into the global namespace.
- The BasicHTMLReporter has been refactored to include a simple templating system for ease of maintenance.
- Tests have been migrated to Jasmine 2.0.