Merge branch 'Tests' of https://github.com/SemvdH/Next-Location into Tests

# Conflicts:
#	app/src/main/res/layout/fragment_settings.xml
This commit is contained in:
Bipin
2021-01-05 13:27:46 +01:00
28 changed files with 291 additions and 171 deletions

View File

@@ -25,14 +25,14 @@ public class LocationFragmentTest {
@Test
public void clickBackButton() throws Exception{
mActivityTestRule.getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.mainActivity, new LocationFragment()).commit();
onView(withId(R.id.locationBackButton)).perform(click());
onView(withId(R.id.location_back_button)).perform(click());
onView(withId(R.id.homeFragment)).check(matches(isDisplayed()));
}
@Test
public void clickDetailButton() throws Exception{
mActivityTestRule.getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.mainActivity, new LocationFragment()).commit();
onView(withId(R.id.locationRecyclerView)).perform(RecyclerViewActions.actionOnItemAtPosition(1, click()));
onView(withId(R.id.location_recyclerview)).perform(RecyclerViewActions.actionOnItemAtPosition(1, click()));
onView(withId(R.id.locationDetailFragment)).check(matches(isDisplayed()));
}