I would like a hint on how to check for the correct fragment after the click
Follow the (Wrong) thought for example, does anyone have an example of how I can test this?
@RunWith(AndroidJUnit4.class)
public class MapsActivityTest extends AppCompatActivity {
FragmentManager fragmentManager = getSupportFragmentManager();
Fragment fragment = fragmentManager.findFragmentByTag(getResources().getString(R.string.fragment_routes_title));
@Test
@SmallTest
public void showUIMap() {
onView(withId(R.id.request_textview)).perform(click()).check(assertThat(fragment.getActivity().getSupportFragmentManager()
.findFragmentByTag("MyRides)"),is(true));
}
}
Another question, should I extend AppCompactivity?