Skip to content

Commit

Permalink
Update movie_detail_page_test.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
godofsleepy committed Nov 30, 2021
1 parent 319e1a4 commit acf8082
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/presentation/pages/movie_detail_page_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void main() {
recommendationState: RequestState.Loaded,
movieRecommendations: [],
isAddedToWatchlist: false,
watchlistMessage: "Added to Watchlist",
watchlistMessage: "",
));

when(mockNotifier.stream).thenAnswer((_) => Stream.value(MovieDetailState(
Expand All @@ -111,8 +111,8 @@ void main() {
await tester.tap(watchlistButton);
await tester.pump();

expect(find.byType(SnackBar), findsOneWidget);
expect(find.text('Added to Watchlist'), findsOneWidget);
expectLater(find.byType(SnackBar), findsOneWidget);
expectLater(find.text('Added to Watchlist'), findsOneWidget);
});

testWidgets(
Expand All @@ -124,7 +124,7 @@ void main() {
recommendationState: RequestState.Loaded,
movieRecommendations: [],
isAddedToWatchlist: false,
watchlistMessage: "Failed",
watchlistMessage: "",
));

when(mockNotifier.stream).thenAnswer((_) => Stream.value(MovieDetailState(
Expand All @@ -145,7 +145,7 @@ void main() {
await tester.tap(watchlistButton);
await tester.pump();

expect(find.byType(AlertDialog), findsOneWidget);
expect(find.text('Failed'), findsOneWidget);
expectLater(find.byType(AlertDialog), findsOneWidget);
expectLater(find.text('Failed'), findsOneWidget);
});
}

0 comments on commit acf8082

Please sign in to comment.