I'm the author of ScadaJS and I need to create unit tests for visual components. Up to now, the components are checked manually by human interaction.
For example, this bug simply describes what the problem is with a visual component by screenshots. Reporter says "it should look like this but looks like that and this is not something expected". Developers fix the component, check it manually in the showcase page and close the issue if everything goes well.
As one component's changes may break more than one other component, I think we should automate these tests. How do the people perform such checks in libraries where the visual stuff come into play?
A guess
We could write a script that will automatically create mouse movements and clicks, then it will create a .gif which will be used to create a reference point. If anything changes, difference of two gifs won't be a black .gif, so the test suit will throw an exception. If we set a flag to indicate "everything is OK with this component, I only changed the font size", then it will use new .gif as a reference point.