feat(player): 互动栏改用参考图同款图标资源

This commit is contained in:
Zhou Weidong committed 2026-10-21 11:02:05 +08:00
1 parent 35de4095b0
commit cbb9f60f7f
10 files changed
+61 -78

No files matched your search

+17 -22
View File
@@ -150,38 +150,33 @@ void main() {
tester.widget<Text>(find.byKey(const Key('rail-comments-count'))).data,
'12',
);
String railAsset(Key key) {
final image = tester.widget<Image>(
find.descendant(of: find.byKey(key), matching: find.byType(Image)),
);
return (image.image as AssetImage).assetName;
}
expect(railAsset(const Key('rail-save')), 'assets/icon/rail/rail_save.png');
expect(
find.descendant(
of: find.byKey(const Key('rail-save')),
matching: find.byIcon(Icons.star_rounded),
),
findsOneWidget,
railAsset(const Key('rail-comments')),
'assets/icon/rail/rail_comment.png',
);
expect(railAsset(const Key('rail-like')), 'assets/icon/rail/rail_like.png');
expect(
find.descendant(
of: find.byKey(const Key('rail-like')),
matching: find.byIcon(Icons.favorite_rounded),
),
findsOneWidget,
);
expect(
find.descendant(
of: find.byKey(const Key('rail-share')),
matching: find.byIcon(Icons.reply_rounded),
),
findsOneWidget,
railAsset(const Key('rail-share')),
'assets/icon/rail/rail_share.png',
);
expect(
tester
.widget<Transform>(
.widget<Image>(
find.descendant(
of: find.byKey(const Key('rail-share')),
matching: find.byType(Transform),
matching: find.byType(Image),
),
)
.transform
.storage[0],
-1,
.colorBlendMode,
BlendMode.srcIn,
);
expect(find.byKey(const Key('progress-loading')), findsOneWidget);
expect(find.byKey(const Key('home-feed-progress-thumb')), findsNothing);