feat(flutter): 榜单前三铺满与剧场分类吸顶下划线

This commit is contained in:
Zhou Weidong committed 2026-10-20 15:13:12 +08:00
1 parent d80fff74ba
commit 04a1a4ee82
4 files changed
+130 -52

No files matched your search

+22 -1
View File
@@ -226,6 +226,27 @@ void main() {
expect(header().color, AppColors.ink);
});
testWidgets('should_show_category_underline_for_selection', (tester) async {
await _pumpTheater(tester, categoryRepository: _GridCategoryRepository());
Color underline(String id) =>
(tester
.widget<Container>(
find.byKey(Key('theater-category-underline-$id')),
)
.decoration!
as BoxDecoration)
.color!;
expect(underline('all'), AppColors.blue);
expect(underline('7'), Colors.transparent);
await tester.tap(find.byKey(const Key('theater-category-7')));
await tester.pumpAndSettle();
expect(underline('all'), Colors.transparent);
expect(underline('7'), AppColors.blue);
});
testWidgets('should_use_compact_refresh_indicator', (tester) async {
await _pumpTheater(tester, categoryRepository: _GridCategoryRepository());
final indicator = tester.widget<RefreshIndicator>(
@@ -234,7 +255,7 @@ void main() {
expect(indicator.color, AppColors.blue);
expect(indicator.strokeWidth, 2);
expect(indicator.edgeOffset, 110);
expect(indicator.edgeOffset, 52);
});
}