3 ms·
I live in constant worry of changing css and totally screwing up a completely unrelated bit of the web app I understand this worry, but it makes me think that
by MartinCron 15y ago
I live in constant worry of changing css and totally screwing up a completely unrelated bit of the web app
I understand this worry, but it makes me think that it may be a design problem with the CSS. Unrelated bits shouldn't be using the same CSS, related bits should probably change together.
In a more practical note, I have created selenium tests which capture screenshots and then saved those screenshots as artifacts in the CI (TeamCity) system. Having a human look at a bunch of static images makes for a faster and less error-prone sanity test to see if things are totally broken.
- riffraff 15y agoI agree it may be a design problem with the CSS, I agree. But my point is exactly that: I can't just go in and _improve the code_ (extracting classes, rewriting it in less/sass or whatever) because to verify the changes do not mess up the UI requires clicking around many pages in half a dozen browsers in three OSes. And thank you very much for the practical note, it's an interesting idea!
- MartinCron 15y agoYou're in the catch-22 of being unable to write tests without refactoring, and unable to refactor without test coverage. I get it. I hope the automated screenshot idea helps. I personally found it more useful in theory than in practice, but I wasn't doing a lot of UI polish work.
- MartinCron 15y agoOne other practical note, you can create a single (test) page that showcases all of the visual styles currently in use, so there is one page to check manually.