fix(player): 独立全屏路由复用播放会话

This commit is contained in:
Zhou Weidong committed 2026-10-26 16:08:15 +08:00
1 parent 23e80dd637
commit 9d2d3b97a1
4 files changed
+219 -103

No files matched your search

+10 -2
View File
@@ -474,10 +474,11 @@ void main() {
expect(find.byType(PlayerPage), findsOneWidget);
expect(
tester.widget<PlayerPage>(find.byType(PlayerPage)).homeMode,
isTrue,
isFalse,
);
expect(find.byKey(const Key('player-back')), findsOneWidget);
tester.state<NavigatorState>(find.byType(Navigator).first).pop();
expect(find.byKey(const Key('home-tabs-bar')), findsNothing);
await tester.tap(find.byKey(const Key('player-back')));
await tester.pumpAndSettle();
expect(find.byKey(const Key('recommend-page')), findsOneWidget);
expect(find.byKey(const Key('recommend-tab-recommend')), findsOneWidget);
@@ -485,7 +486,14 @@ void main() {
await tester.tap(find.byKey(const Key('home-feed-full-series')));
await tester.pumpAndSettle();
expect(find.byType(PlayerPage), findsOneWidget);
expect(
tester.widget<PlayerPage>(find.byType(PlayerPage)).homeMode,
isFalse,
);
expect(find.byKey(const Key('player-back')), findsOneWidget);
expect(find.byKey(const Key('home-tabs-bar')), findsNothing);
await tester.tap(find.byKey(const Key('player-back')));
await tester.pumpAndSettle();
});
testWidgets('should_pull_refresh_recommend_feed_from_the_first_video', (