Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-kalbermatter committed Mar 16, 2023
1 parent f7fba7b commit ddef300
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ public void testRecentlyWatchedTitle() {
@Test
public void testAddMovieButton() {
ViewInteraction addMovieButton = onView(withId(R.id.add_movie_button));
addMovieButton.check(matches(isDisplayed()));
ViewInteraction horizontalScrollView = onView(withId(R.id.horizontal_scroll_view));
horizontalScrollView.check(matches(hasDescendant(withId(R.id.add_movie_button))));
}

// Test whether the horizontal scroll list is displayed and contains the addMovieButton
@Test
public void testHorizontalScrollList() {
ViewInteraction horizontalScrollView = onView(withId(R.id.horizontal_scroll_view));
horizontalScrollView.check(matches(isDisplayed()));
horizontalScrollView.check(matches(hasDescendant(withId(R.id.add_movie_button))));
}

// Test whether a movie item, which consists of an image of a movie and a title and rating text,
Expand All @@ -97,8 +97,8 @@ public void testHorizontalScrollList() {
public void testMovieItem() {
ViewInteraction movieItem = onView(withId(R.id.test_movie_item));
movieItem.check(matches(isDisplayed()));
movieItem.check(matches(hasDescendant(withText("Title"))));
movieItem.check(matches(hasDescendant(withText("Rating"))));
movieItem.check(matches(hasDescendant(withText("Skyfall"))));
movieItem.check(matches(hasDescendant(withText("Rating: 10"))));
}

}
Expand Down

0 comments on commit ddef300

Please sign in to comment.