Introduce snapshot tests
The following discussion from !1043 (merged) should be addressed:
I guess it's worth introducing "snapshot tests," i.e. the tests that setup the workspace, render a frame and then compare it with a reference screenshot. The problem is getting the reference screenshot.
Prior art: openQA. Could we have something like openQA in kwin?
Snapshot tests verify that the rendered scene is correct. The naive approach will be to compare the rendered frame and the reference frame pixel by pixel, however any small changes in rendering code may result in many red tests. It makes sense to have some metric that allows small errors.