fix(home): 调整封面播放量位置
This commit is contained in:
1 parent
e11f55777e
commit
972e542e5c
10 files changed
+179
-147
No files matched your search
@@ -92,9 +92,11 @@ void main() {
|
||||
coverClip.borderRadius,
|
||||
BorderRadius.circular(AppDimens.cardCoverRadius),
|
||||
);
|
||||
final cover = tester.widget<AspectRatio>(
|
||||
find.descendant(of: card, matching: find.byType(AspectRatio)),
|
||||
final coverFinder = find.descendant(
|
||||
of: card,
|
||||
matching: find.byType(AspectRatio),
|
||||
);
|
||||
final cover = tester.widget<AspectRatio>(coverFinder);
|
||||
expect(cover.aspectRatio, AppDimens.cardCoverAspectRatio);
|
||||
final cardTitle = tester.widget<Text>(
|
||||
find.byKey(const Key('recommend-title-hits-the-signal-demo')),
|
||||
@@ -110,6 +112,13 @@ void main() {
|
||||
);
|
||||
expect(views.style?.fontSize, AppDimens.cardPlayCountFont);
|
||||
expect(views.style?.fontWeight, FontWeight.w400);
|
||||
expect(
|
||||
find.descendant(
|
||||
of: coverFinder,
|
||||
matching: find.byKey(const Key('recommend-views-hits-the-signal-demo')),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(views.style?.color, AppColors.textPrimary);
|
||||
final viewIcon = find.descendant(
|
||||
of: find.byKey(const Key('recommend-views-hits-the-signal-demo')),
|
||||
@@ -132,7 +141,7 @@ void main() {
|
||||
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(cardTitle).dx, tester.getTopLeft(coverFinder).dx);
|
||||
expect(tester.getTopLeft(tags).dx, tester.getTopLeft(cover).dx);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user