Why CSS Testing Could Be Huge
Design has established itself as a differentiating factor in web applications, and along with it, the importance of the visual experience. Testing visuals is usually done by manual inspection, which can get tedious. Integration testing misses out on that very aspect of how your application should look at any given time.
Fortunately, the visual experience on the web is controlled by CSS, and CSS is testable. Frameworks like Needle have taken a stab at it. But I find them too cumbersome to be useful; Needle compares your pages to gold-standard screenshots.
So I was really excited when my friend and ex-colleague Winston released Cactus. Cactus takes a more practical approach and tests based on the computed CSS of the document.
But hold on, isn’t it overkill to test your CSS?
No it’s not.
You do it already
You already have a style guide. You already know what classes and styles each...
Continue reading →