fix: issue-372, issue-227, issue-406

This commit is contained in:
misha
2026-09-02 09:32:14 +03:00
parent 10af279d87
commit c6ea1d414d
34 changed files with 1623 additions and 387 deletions

View File

@@ -85,4 +85,27 @@ void main() {
expect(image.fit, BoxFit.fitWidth);
});
});
testWidgets('empty cover does not reserve media height', (tester) async {
await tester.pumpWidget(wrap(media(images: const [], imageUrl: '')));
await tester.pump();
expect(find.byType(CachedNetworkImage), findsNothing);
expect(tester.getSize(find.byType(BlogPostMediaContent)).height, 0);
});
testWidgets('placeholder cover does not reserve media height', (tester) async {
await tester.pumpWidget(
wrap(
media(
images: const [],
imageUrl: 'images/element-image-placeholder.svg',
),
),
);
await tester.pump();
expect(find.byType(CachedNetworkImage), findsNothing);
expect(tester.getSize(find.byType(BlogPostMediaContent)).height, 0);
});
}