fix(recommend): 修正推荐子页内容映射

This commit is contained in:
Zhou Weidong committed 2026-10-22 17:36:58 +08:00
1 parent af6b9bb3db
commit d06967c6ab
8 files changed
+128 -48

No files matched your search

+11 -2
View File
@@ -96,7 +96,7 @@ void main() {
expect(tester.takeException(), isNull);
});
testWidgets('should_show_section_feed_and_open_player_from_recommend', (
testWidgets('should_show_immersive_player_and_open_playlist_in_recommend', (
tester,
) async {
SharedPreferencesAsyncPlatform.instance =
@@ -126,8 +126,17 @@ void main() {
expect(find.byKey(const Key('home-grid')), findsNothing);
expect(find.byKey(const Key('recommend-page')), findsOneWidget);
expect(find.byKey(const Key('recommend-feed-player')), findsOneWidget);
expect(find.byType(PlayerPage), findsOneWidget);
expect(
tester.widget<PlayerPage>(find.byType(PlayerPage)).homeMode,
isTrue,
);
expect(find.byKey(const Key('recommend-section-hits')), findsNothing);
await tester.tap(find.byKey(const Key('recommend-tab-playlist')));
await tester.pumpAndSettle();
expect(find.byKey(const Key('recommend-section-hits')), findsOneWidget);
expect(find.byType(PlayerPage), findsNothing);
await tester.tap(
find.byKey(const Key('recommend-card-hits-the-signal-demo')),