fix(player): 收敛播放入口缓冲提示

This commit is contained in:
Zhou Weidong committed 2026-10-22 10:47:16 +08:00
1 parent f302b396b7
commit 7ad4681049
12 files changed
+218 -42

No files matched your search

+10 -9
View File
@@ -99,13 +99,8 @@ void main() {
await tester.pump();
await tester.pump(const Duration(milliseconds: 100));
final sessionLoading = find.byKey(const Key('player-session-loading'));
expect(sessionLoading, findsOneWidget);
expect(tester.getSize(sessionLoading), const Size(24, 24));
expect(
tester.widget<CircularProgressIndicator>(sessionLoading).strokeWidth,
2,
);
expect(find.byKey(const Key('player-session-loading')), findsNothing);
expect(find.byKey(const Key('progress-loading')), findsNothing);
initialization.complete();
await tester.pumpWidget(const SizedBox.shrink());
@@ -127,6 +122,8 @@ void main() {
await _openSeriesPlayer(tester);
final player = players.firstWhere((item) => item.playing);
expect(player.playing, isTrue);
expect(find.byKey(const Key('progress-loading')), findsNothing);
expect(find.byKey(const Key('progress-inactive')), findsOneWidget);
final navigator = tester.state<NavigatorState>(
find.byType(Navigator).first,
@@ -147,6 +144,8 @@ void main() {
await tester.pumpAndSettle();
expect(player.playing, isTrue);
expect(find.byKey(const Key('progress-loading')), findsNothing);
expect(find.byKey(const Key('progress-inactive')), findsOneWidget);
});
testWidgets('should_pause_feed_when_auth_page_is_pushed_and_resume_on_pop', (
@@ -571,7 +570,8 @@ void main() {
tester.getSize(find.byKey(const Key('player-bottom-clear-screen'))),
const Size(40, 40),
);
expect(find.byKey(const Key('progress-loading')), findsOneWidget);
expect(find.byKey(const Key('progress-loading')), findsNothing);
expect(find.byKey(const Key('progress-inactive')), findsOneWidget);
expect(find.byType(Slider), findsNothing);
expect(bottom.height, lessThanOrEqualTo(200));
@@ -1301,7 +1301,8 @@ void _expectFullscreenOverlay(WidgetTester tester) {
expect(find.byKey(const Key('player-pip')), findsNothing);
expect(find.byKey(const Key('player-rail-comments')), findsOneWidget);
expect(find.byKey(const Key('player-fullscreen-toggle')), findsNothing);
expect(find.byKey(const Key('progress-loading')), findsOneWidget);
expect(find.byKey(const Key('progress-loading')), findsNothing);
expect(find.byKey(const Key('progress-inactive')), findsOneWidget);
expect(find.byType(Slider), findsNothing);
expect(find.byKey(const Key('player-title')), findsNothing);
expect(find.byKey(const Key('player-subtitle')), findsNothing);