You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we test masking with standard unit tests. Because of the visual nature of the output some things are hard to verify this way, for example that a mask is rendered fully over a widget, or that the mask is not partially transparent (#2472).
I think we should add tests that save an image and compare it to a "golden" image asset saved in the test directory. This way we would be sure if anything changes (a.k.a. breaks) in masking. Adding one "golden" file before the masking is applied and another one after would help us identify flakiness (if any) that has nothing to do with masking.
Description
Currently, we test masking with standard unit tests. Because of the visual nature of the output some things are hard to verify this way, for example that a mask is rendered fully over a widget, or that the mask is not partially transparent (#2472).
I think we should add tests that save an image and compare it to a "golden" image asset saved in the test directory. This way we would be sure if anything changes (a.k.a. breaks) in masking. Adding one "golden" file before the masking is applied and another one after would help us identify flakiness (if any) that has nothing to do with masking.
See https://api.flutter.dev/flutter/flutter_test/matchesGoldenFile.html
The text was updated successfully, but these errors were encountered: