[PR #6193] fix flaky reports tests #6377

Closed
opened 2026-02-28 21:27:27 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6193

State: closed
Merged: Yes


Hopefully this will fix the flaky cash flow chart VRT. That chart's animation is set to run for 1000ms, so I imagine the issue is caused by the screenshot sometimes grabbing just before it's finished. To mitigate this in the future, I also just disabled all recharts animations in VRT in case we use some other really long animation in the future. I also swapped from animationDuration: 0 to disabling the animations completely, the reports page seems a bit quicker for that too.

Also refactored some other places we detect the playwright env to tidy up a bit, it's only a tiny hook but we may need to expand this in the future and it's easier to just change it in one place if we need.

Looks like the flake was introduced because the order that stacked bars animated was changed in https://github.com/recharts/recharts/pull/6593

There look to be lots of changes here because I regenerated all reports screenshots. Some were so close to the threshold that tiny normal inconsistencies were pushing them over the edge and causing flakes.

I've run the VRT about 5/6 times and no fails after this change

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6193 **State:** closed **Merged:** Yes --- Hopefully this will fix the flaky cash flow chart VRT. That chart's animation is set to run for 1000ms, so I imagine the issue is caused by the screenshot sometimes grabbing just before it's finished. To mitigate this in the future, I also just disabled all recharts animations in VRT in case we use some other really long animation in the future. I also swapped from `animationDuration: 0` to disabling the animations completely, the reports page seems a bit quicker for that too. Also refactored some other places we detect the playwright env to tidy up a bit, it's only a tiny hook but we may need to expand this in the future and it's easier to just change it in one place if we need. Looks like the flake was introduced because the order that stacked bars animated was changed in https://github.com/recharts/recharts/pull/6593 There look to be lots of changes here because I regenerated all reports screenshots. Some were so close to the threshold that tiny normal inconsistencies were pushing them over the edge and causing flakes. I've run the VRT about 5/6 times and no fails after this change
GiteaMirror added the pull-request label 2026-02-28 21:27:27 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#6377