csste.st

The why and how of CSS testing.

Quixote

This library uses a simple syntax for generating assertions not just based on the values of elements themselves but also how these elements relate to others. The example in the docs explains well:

menu.assert({
  top: logo.bottom.plus(10)   // menu is 10px below logo
});

Instead of specifying the value of the 'menu' element, we check that it is specifically 10px below the 'logo' element. This is more likely to lead to tests that can withstand minor modifications while maintaining specific layout relations.

It is designed to be used with existing testing frameworks such as Karma, Mocha or Jasmine.

Techniques