[ADD] Comments

This commit is contained in:
Robin Koedood
2021-01-05 13:32:44 +01:00
parent e36e853875
commit 77a6226c1d
4 changed files with 8 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ public class RouteFragmentTest {
@Test
public void clickBackButton() throws Exception{
//Here we click the back button and then we check if the homeFragment is shown
mActivityTestRule.getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.mainActivity, new RouteFragment()).commit();
onView(withId(R.id.route_back_button)).perform(click());
onView(withId(R.id.homeFragment)).check(matches(isDisplayed()));
@@ -29,6 +30,7 @@ public class RouteFragmentTest {
@Test
public void clickDetailButton() throws Exception{
//Here we click an item in the recyclerview and then check if the routeDetailFragment is called
mActivityTestRule.getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.mainActivity, new RouteFragment()).commit();
onView(withId(R.id.route_recyclerview)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));
onView(withId(R.id.routeDetailFragment)).check(matches(isDisplayed()));