odoo/o-spreadsheet#813

Created by BI, Lucas Lefèvre (lul)
Closed
label
odoo:master-test-renderer-lul
head
73850a4341c2a3b9e8b658a9203716b23898b8d2
odoo/o-spreadsheet
master #813

[IMP] tests: Snapshot rendered canvas

Writing renderer tests is cumbersome. It relies on a mock canvas and tests
must check what properties/methods the renderer calls. It is hard to write
and read.
As a result, the renderer is poorly tested.

Moreover, this testing strategy is fragile since it relies on the renderer
implementation.

This PR addresses both issues at once.
We can now "screenshot" the canvas and save it as a jest snapshot.
Like regular jest snapshot, tests will fail if the screenshot is not
identical to the previous one.

One downside: png images are committed in the repo. It shouldn't be much of
a problem since they would usually be small. But makes sure to only screenshot
what you need ;)

Existing tests are also converted with this new screenshot mechanism.