Open jailln opened 1 year ago
You mean that we would compare a screenshot of each page loaded in functional tests with a screenshot we previously took of the same page ? If so, it would indeed increase tests reliability. We would also need to evaluate the time it takes for each screenshot comparison : sometimes relaunching functional tests several times in a row just because of a connection error can be painful because of how long functional tests take to complete. However, this could probably be fixed by allowing each functional test to be launched independently in GitHub actions.
You mean that we would compare a screenshot of each page loaded in functional tests with a screenshot we previously took of the same page ? If so, it would indeed increase tests reliability.
Yep that's right.
We would also need to evaluate the time it takes for each screenshot comparison : sometimes relaunching functional tests several times in a row just because of a connection error can be painful because of how long functional tests take to complete. However, this could probably be fixed by allowing each functional test to be launched independently in GitHub actions.
Yes you're right we should verify that. I think it is quite fast to compare two images but we need to double check.
There is a method to save screenshots in the functional tests helper functions. We should try to use it to improve our examples testing. Note that there is a puppeteer lib that allows to compare screenshots.