fix(recommend): 修正推荐子页内容映射
This commit is contained in:
1 parent
af6b9bb3db
commit
d06967c6ab
8 files changed
+128
-48
No files matched your search
@@ -36,19 +36,18 @@ void main() {
|
||||
InMemorySharedPreferencesAsync.empty();
|
||||
});
|
||||
|
||||
testWidgets('should_open_fullscreen_overlay_from_recommend_feed', (
|
||||
testWidgets('should_render_immersive_overlay_in_recommend_feed', (
|
||||
tester,
|
||||
) async {
|
||||
await _pumpApp(tester);
|
||||
await tester.tap(find.byKey(const Key('tab-recommend')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(
|
||||
find.byKey(const Key('recommend-card-hits-the-signal-demo')),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byKey(const Key('recommend-feed-player')), findsOneWidget);
|
||||
expect(
|
||||
tester.widget<PlayerPage>(find.byType(PlayerPage).last).homeMode,
|
||||
tester
|
||||
.widget<PlayerPage>(find.byKey(const Key('recommend-feed-player')))
|
||||
.homeMode,
|
||||
isTrue,
|
||||
);
|
||||
expect(find.byType(PageView), findsOneWidget);
|
||||
@@ -80,10 +79,6 @@ void main() {
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
await tester.tap(find.byKey(const Key('tab-recommend')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(
|
||||
find.byKey(const Key('recommend-card-hits-the-signal-demo')),
|
||||
);
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
|
||||
@@ -170,10 +165,6 @@ void main() {
|
||||
);
|
||||
await tester.tap(find.byKey(const Key('tab-recommend')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(
|
||||
find.byKey(const Key('recommend-card-hits-the-signal-demo')),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
final player = players.firstWhere((item) => item.playing);
|
||||
expect(player.playing, isTrue);
|
||||
|
||||
|
||||
Reference in new issue
Block a user