fix(home): 修正封面角标与题材标签

This commit is contained in:
Zhou Weidong committed 2026-10-22 18:26:52 +08:00
1 parent 3abf69e886
commit e16faa258a
10 files changed
+199 -199

No files matched your search

+15 -8
View File
@@ -115,17 +115,24 @@ void main() {
matching: find.byIcon(Icons.auto_awesome_rounded),
);
expect(viewIcon, findsOneWidget);
final ribbon = find.byKey(
const Key('drama-genre-ribbon-hits-the-signal-demo-0'),
final badge = find.byKey(
const Key('drama-cover-badge-ribbon-hits-the-signal-demo-hot'),
);
expect(ribbon, findsOneWidget);
final ribbonText = tester.widget<Text>(
find.descendant(of: ribbon, matching: find.byType(Text)),
expect(badge, findsOneWidget);
final badgeText = tester.widget<Text>(
find.descendant(of: badge, matching: find.byType(Text)),
);
expect(ribbonText.data, 'Suspense');
expect(ribbonText.style?.fontSize, AppDimens.cardBadgeFont);
expect(ribbonText.style?.color, AppColors.textPrimary);
expect(badgeText.data, 'Hit');
expect(badgeText.style?.fontSize, AppDimens.cardBadgeFont);
expect(badgeText.style?.color, AppColors.textPrimary);
final tags = tester.widget<Text>(
find.byKey(const Key('recommend-tags-hits-the-signal-demo')),
);
expect(tags.data, 'Suspense | Mystery');
expect(tags.style?.fontSize, AppDimens.cardTagFont);
expect(tags.style?.color, AppColors.textTertiary);
expect(tester.getTopLeft(cardTitle).dx, tester.getTopLeft(cover).dx);
expect(tester.getTopLeft(tags).dx, tester.getTopLeft(cover).dx);
});
testWidgets('should_switch_inner_tabs_without_losing_grid_filter_state', (