feat(library): 支持设备追剧与观看历史
This commit is contained in:
1 parent
4c3acb047c
commit
0d785bf1f8
12 files changed
+232
-76
No files matched your search
@@ -187,22 +187,20 @@ void main() {
|
||||
expect(find.byKey(const Key('favorites-retry')), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'should_show_auth_gate_without_loading_favorites_when_signed_out',
|
||||
(tester) async {
|
||||
final auth = await _auth(signedIn: false);
|
||||
final repository = InMemoryFavoriteRepository(
|
||||
saved: {'signal'},
|
||||
cards: [_card('signal')],
|
||||
);
|
||||
final favorites = FavoriteController(repository);
|
||||
testWidgets('should_show_device_favorites_when_signed_out', (tester) async {
|
||||
final auth = await _auth(signedIn: false);
|
||||
final repository = InMemoryFavoriteRepository(
|
||||
saved: {'signal'},
|
||||
cards: [_card('signal')],
|
||||
);
|
||||
final favorites = FavoriteController(repository);
|
||||
|
||||
await _pumpPage(tester, auth: auth, favorites: favorites);
|
||||
await _pumpPage(tester, auth: auth, favorites: favorites);
|
||||
|
||||
expect(find.byKey(const Key('auth-gate-panel')), findsOneWidget);
|
||||
expect(repository.pageCalls, 0);
|
||||
},
|
||||
);
|
||||
expect(find.byKey(const Key('auth-gate-panel')), findsNothing);
|
||||
expect(find.text('Drama signal'), findsOneWidget);
|
||||
expect(repository.pageCalls, 1);
|
||||
});
|
||||
|
||||
testWidgets('should_open_player_when_favorite_card_is_tapped', (
|
||||
tester,
|
||||
|
||||
Reference in new issue
Block a user