fix(screenshots): precache asset images so the home logo renders; explain the Plantare name

This commit is contained in:
vjrj 2026-07-15 12:26:18 +02:00
parent 67f1c0da0c
commit 05947e03ee
8 changed files with 35 additions and 18 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Before After
Before After

View file

@ -61,6 +61,15 @@ void main() {
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
await tester.pumpAndSettle();
// Asset images (e.g. the home logo) decode via real async that the fake
// test clock doesn't drive, so they'd paint blank. Precache them for real,
// then repaint, so they show up in the golden.
await tester.runAsync(() async {
for (final element in find.byType(Image).evaluate()) {
await precacheImage((element.widget as Image).image, element);
}
});
await tester.pumpAndSettle();
await expectLater(
find.byType(MaterialApp),
matchesGoldenFile('goldens/$dir/$name.png'),