[ADD] Main Activity Test
This commit is contained in:
@@ -41,7 +41,7 @@ public class MainActivityTest {
|
|||||||
public void clickRouteNavBar() throws Exception{
|
public void clickRouteNavBar() throws Exception{
|
||||||
//Here we click the back button and then we check if the statisticsFragment is shown
|
//Here we click the back button and then we check if the statisticsFragment is shown
|
||||||
mActivityTestRule.getActivity().getSupportFragmentManager().beginTransaction().commit();
|
mActivityTestRule.getActivity().getSupportFragmentManager().beginTransaction().commit();
|
||||||
onView(withId(R.id.routes)).perform(NavigationViewActions.navigateTo(R.id.routes));
|
onView(withId(R.id.routes)).perform((click()));
|
||||||
onView(withId(R.id.routeFragment)).check(matches(isDisplayed()));
|
onView(withId(R.id.routeFragment)).check(matches(isDisplayed()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class SettingsFragment extends Fragment {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
Spinner dropdown = view.findViewById(R.id.dropdown_menu_Settings);
|
Spinner dropdown = view.findViewById(R.id.dropdown_menu_Settings);
|
||||||
|
|
||||||
this.imageButton = view.findViewById(R.id.route_detail_back_button);
|
this.imageButton = view.findViewById(R.id.settings_back_button);
|
||||||
this.imageButton.setOnClickListener(v -> {
|
this.imageButton.setOnClickListener(v -> {
|
||||||
HomeFragment homeFragment = new HomeFragment();
|
HomeFragment homeFragment = new HomeFragment();
|
||||||
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
|
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
|
||||||
|
|||||||
Reference in New Issue
Block a user