fix(recommend): 修正标题与观看全集跳转

This commit is contained in:
Zhou Weidong committed 2026-10-22 20:31:41 +08:00
1 parent 23799353b5
commit 357492acb2
6 files changed
+82 -52

No files matched your search

+25 -1
View File
@@ -278,6 +278,30 @@ void main() {
expect(find.byKey(const Key('all-dramas-grid')), findsOneWidget);
});
testWidgets('should_open_standalone_player_from_title_and_watch_all', (
tester,
) async {
await _pumpRecommend(tester);
await tester.tap(find.byKey(const Key('home-feed-title-open')));
await tester.pumpAndSettle();
expect(
tester.widget<PlayerPage>(find.byType(PlayerPage).last).homeMode,
isFalse,
);
await tester.binding.handlePopRoute();
await tester.pumpAndSettle();
expect(find.byKey(const Key('recommend-page')), findsOneWidget);
expect(find.byKey(const Key('recommend-tab-recommend')), findsOneWidget);
await tester.tap(find.byKey(const Key('home-feed-full-series')));
await tester.pumpAndSettle();
expect(
tester.widget<PlayerPage>(find.byType(PlayerPage).last).homeMode,
isFalse,
);
});
testWidgets('should_open_player_and_search_from_recommend_page', (
tester,
) async {
@@ -290,7 +314,7 @@ void main() {
);
await tester.pumpAndSettle();
final player = tester.widget<PlayerPage>(find.byType(PlayerPage).last);
expect(player.homeMode, isTrue);
expect(player.homeMode, isFalse);
await tester.binding.handlePopRoute();
await tester.pumpAndSettle();