fix(player): 隔离播放资源所有权并修复黑屏
This commit is contained in:
1 parent
54eb5a60a8
commit
bb2c729a7e
9 files changed
+223
-25
No files matched your search
@@ -471,13 +471,13 @@ void main() {
|
||||
|
||||
await tester.tap(find.byKey(const Key('home-feed-series-name')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(PlayerPage), findsOneWidget);
|
||||
expect(find.byType(PlayerPage).last, findsOneWidget);
|
||||
expect(
|
||||
tester.widget<PlayerPage>(find.byType(PlayerPage)).homeMode,
|
||||
tester.widget<PlayerPage>(find.byType(PlayerPage).last).homeMode,
|
||||
isFalse,
|
||||
);
|
||||
expect(find.byKey(const Key('player-back')), findsOneWidget);
|
||||
expect(find.byKey(const Key('home-tabs-bar')), findsNothing);
|
||||
expect(find.byKey(const Key('home-tabs-bar')).hitTestable(), findsNothing);
|
||||
await tester.tap(find.byKey(const Key('player-back')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byKey(const Key('recommend-page')), findsOneWidget);
|
||||
@@ -485,13 +485,13 @@ void main() {
|
||||
|
||||
await tester.tap(find.byKey(const Key('home-feed-full-series')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(PlayerPage), findsOneWidget);
|
||||
expect(find.byType(PlayerPage).last, findsOneWidget);
|
||||
expect(
|
||||
tester.widget<PlayerPage>(find.byType(PlayerPage)).homeMode,
|
||||
tester.widget<PlayerPage>(find.byType(PlayerPage).last).homeMode,
|
||||
isFalse,
|
||||
);
|
||||
expect(find.byKey(const Key('player-back')), findsOneWidget);
|
||||
expect(find.byKey(const Key('home-tabs-bar')), findsNothing);
|
||||
expect(find.byKey(const Key('home-tabs-bar')).hitTestable(), findsNothing);
|
||||
await tester.tap(find.byKey(const Key('player-back')));
|
||||
await tester.pumpAndSettle();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user