Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image-based masking tests #2473

Open
vaind opened this issue Dec 10, 2024 · 0 comments
Open

Image-based masking tests #2473

vaind opened this issue Dec 10, 2024 · 0 comments

Comments

@vaind
Copy link
Collaborator

vaind commented Dec 10, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant