Skip to content

0.3.0

Compare
Choose a tag to compare
@cburgmer cburgmer released this 12 May 20:46
· 338 commits to master since this release
  • 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 use add() followed finally by execute().
  • The reporter API has changed with pageUrl being replaced by the testCase object and report() being renamed to reportTestSuite().
  • 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

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.