style(player): 视频信息区文案统一为 65% 半透明白
flutter-ci / test (push) Canceled after 0s

This commit is contained in:
Vicky committed 2026-10-31 09:41:19 +08:00
1 parent 2ddf9ee1c6
commit a47af8c3ad
7 files changed
+29 -10

No files matched your search

+4 -4
View File
@@ -136,7 +136,7 @@ void _expectExpandedSynopsis(WidgetTester tester) {
final expanded = find.byKey(const Key('home-feed-synopsis-expanded'));
expect(
tester.widget<Text>(expanded).textSpan?.style?.color,
AppColors.overlaySecondary,
AppColors.homeFeedVideoCopy,
);
_expectNoShadows(tester);
_expectWatchGap(tester);
@@ -187,7 +187,7 @@ void main() {
matching: find.byType(Text),
),
);
expect(tag.style?.color, AppColors.overlaySecondary);
expect(tag.style?.color, AppColors.homeFeedVideoCopy);
});
testWidgets('should_skip_motion_when_system_disables_animations', (
@@ -343,7 +343,7 @@ void main() {
final synopsis = tester.widget<Text>(
find.byKey(const Key('home-feed-synopsis')),
);
expect(synopsis.style?.color, AppColors.overlaySecondary);
expect(synopsis.style?.color, AppColors.homeFeedVideoCopy);
expect(synopsis.style?.fontSize, 15);
expect(synopsis.maxLines, 2);
final episode = tester.widget<Text>(
@@ -353,7 +353,7 @@ void main() {
expect(episode.style?.fontSize, 14);
expect(episode.data, 'Episode 2 / 24');
final tag = tester.widget<Text>(find.text('Romance'));
expect(tag.style?.color, AppColors.overlaySecondary);
expect(tag.style?.color, AppColors.homeFeedVideoCopy);
expect(tag.style?.color, synopsis.style?.color);
expect(tag.style?.fontSize, 13);
final hotSearch = tester.widget<Text>(
@@ -2,6 +2,7 @@
// 职责:验证共用简介的短文案、展开声明、内容更新与减少动画行为。
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fruitshorts/core/theme/app_colors.dart';
import 'package:fruitshorts/core/theme/app_theme.dart';
import 'package:fruitshorts/l10n/app_localizations.dart';
import 'package:fruitshorts/pages/player/widgets/expandable_synopsis.dart';
@@ -54,6 +55,14 @@ Future<void> _pump(
}
void main() {
testWidgets('should_use_video_copy_color_when_player_does_not_override', (
tester,
) async {
await _pump(tester, synopsis: _shortCopy);
final synopsis = tester.widget<Text>(find.byKey(_collapsed));
expect(synopsis.style?.color, AppColors.homeFeedVideoCopy);
});
testWidgets('should_hide_toggle_when_synopsis_fits_two_lines', (
tester,
) async {
+1 -1
View File
@@ -1517,7 +1517,7 @@ void main() {
final style = line.style ?? const TextStyle();
expect(style.fontSize, 15);
expect(style.fontWeight, FontWeight.w400);
expect(style.color, AppColors.overlaySecondary);
expect(style.color, AppColors.homeFeedVideoCopy);
expect(style.shadows ?? <Shadow>[], isEmpty);
expect(line.textSpan!.toPlainText(), isNot(startsWith('Episode ')));
expect(line.textSpan!.toPlainText(), isNot(contains(' | ')));