With the use of css selectors to apply styles (for example the background image of the '#footer #footer-img #si-logo' in the about page), we need to also test actual css that is being applied to the page
Based on a test I wrote for NWR I was able to use juice to create an html string with the CSS stylesheets inlined, which when parsed with cheerio provides a really nice way to test css (and to ensure that the UI is still as expected (with every code push)
Here is the first test that shows this in action (from /QA/tests/jade-anonymous-users.coffee)
Next we need to expand this and start testing the main CSS components of each page.
This GH Issue should track the beginning of that workflow and the existence of helper classes to do this (once that is done, we can create other issues to track specific gaps).
We should also start using this technique from now on when writing regression tests
With the use of css selectors to apply styles (for example the background image of the '#footer #footer-img #si-logo' in the about page), we need to also test actual css that is being applied to the page
Based on a test I wrote for NWR I was able to use juice to create an html string with the CSS stylesheets inlined, which when parsed with cheerio provides a really nice way to test css (and to ensure that the UI is still as expected (with every code push)
Here is the first test that shows this in action (from /QA/tests/jade-anonymous-users.coffee)
Next we need to expand this and start testing the main CSS components of each page.
This GH Issue should track the beginning of that workflow and the existence of helper classes to do this (once that is done, we can create other issues to track specific gaps).
We should also start using this technique from now on when writing regression tests
Related https://github.com/Automattic/juice/issues/88
So far juice is working great, but if there are issues (like https://github.com/Automattic/juice/issues/83) we could also try Styliner