fix(player): 收敛播放入口缓冲提示
This commit is contained in:
1 parent
f302b396b7
commit
7ad4681049
12 files changed
+218
-42
No files matched your search
@@ -180,7 +180,11 @@ void main() {
|
||||
.colorBlendMode,
|
||||
BlendMode.srcIn,
|
||||
);
|
||||
expect(find.byKey(const Key('progress-loading')), findsOneWidget);
|
||||
expect(find.byKey(const Key('progress-loading')), findsNothing);
|
||||
expect(
|
||||
find.byKey(const Key('home-feed-progress-inactive')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.byKey(const Key('home-feed-progress-thumb')), findsNothing);
|
||||
});
|
||||
|
||||
@@ -258,6 +262,65 @@ void main() {
|
||||
expect(seeks, 0);
|
||||
});
|
||||
|
||||
testWidgets('should_show_static_track_when_feed_video_is_uninitialized', (
|
||||
tester,
|
||||
) async {
|
||||
final controller = ValueNotifier<VideoPlayerValue>(
|
||||
const VideoPlayerValue.uninitialized(),
|
||||
);
|
||||
addTearDown(controller.dispose);
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
theme: AppTheme.light(),
|
||||
locale: const Locale('en'),
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
home: Builder(
|
||||
builder: (context) => Scaffold(
|
||||
body: HomeFeedOverlay(
|
||||
l10n: AppLocalizations.of(context)!,
|
||||
drama: const Drama(
|
||||
id: 'loading-feed',
|
||||
title: 'Loading Feed',
|
||||
synopsis: 'synopsis',
|
||||
posterUrl: '',
|
||||
),
|
||||
episode: const Episode(
|
||||
id: 'loading-feed-1',
|
||||
number: 1,
|
||||
title: 'Loading',
|
||||
isFree: true,
|
||||
),
|
||||
controller: controller,
|
||||
locked: false,
|
||||
liked: false,
|
||||
saved: false,
|
||||
visible: true,
|
||||
boosting: false,
|
||||
onTogglePlay: () {},
|
||||
onBoostStart: () {},
|
||||
onBoostEnd: () {},
|
||||
onLike: () {},
|
||||
onSave: () {},
|
||||
onComments: () {},
|
||||
onShare: () {},
|
||||
onDetail: () {},
|
||||
onOpenFullPlayer: () {},
|
||||
onMore: () {},
|
||||
onSeek: (_) {},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(find.byKey(const Key('progress-loading')), findsNothing);
|
||||
expect(
|
||||
find.byKey(const Key('home-feed-progress-inactive')),
|
||||
findsOneWidget,
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('should_seek_and_open_player_from_feed_actions', (tester) async {
|
||||
var opened = 0;
|
||||
Duration? seeked;
|
||||
|
||||
Reference in new issue
Block a user