|
I would like to use golden tests for some UI testing. As fonts tend to get rendered slightly differently on different OS Flutter apparently automatically uses the font "Ahem" when running test. Should a FluentApp show that behaviour during tests, too? If not, is there an easy way to achieve that? I'm using theme extensions to manage typography etc. in my fluent application and during tests the fonts are used that I defined. This causes golden tests to fail between different OS. |
Answered by
robkri
Apr 20, 2026
Replies: 1 comment 1 reply
|
I found a solution: Add font as asset and change pubspec.yaml: In your test: Wherever the font is set in the application do something like: |
1 reply
Answer selected by
robkri
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found a solution:
Add font as asset and change pubspec.yaml:
In your test:
Wherever the font is set in the application do something like: