From aec66b63a9bf187b3507d500558f91b99dc7d0e1 Mon Sep 17 00:00:00 2001 From: OliE Date: Sat, 24 Feb 2018 08:19:40 +0100 Subject: [PATCH] fix user add GUI unit test --- .../java/com/health/openscale/gui/UserAddTest.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/android_app/app/src/androidTest/java/com/health/openscale/gui/UserAddTest.java b/android_app/app/src/androidTest/java/com/health/openscale/gui/UserAddTest.java index 9499103a..8109f1f1 100644 --- a/android_app/app/src/androidTest/java/com/health/openscale/gui/UserAddTest.java +++ b/android_app/app/src/androidTest/java/com/health/openscale/gui/UserAddTest.java @@ -56,7 +56,6 @@ import static android.support.test.espresso.action.ViewActions.scrollTo; import static android.support.test.espresso.matcher.ViewMatchers.withClassName; import static android.support.test.espresso.matcher.ViewMatchers.withId; import static org.hamcrest.Matchers.allOf; -import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; @LargeTest @@ -180,14 +179,7 @@ public class UserAddTest { onView(withClassName(Matchers.equalTo(DatePicker.class.getName()))).perform(PickerActions.setDate(2018, 1, 31)); onView(withId(android.R.id.button1)).perform(click()); - ViewInteraction button3 = onView( - allOf(withId(R.id.saveButton), - childAtPosition( - childAtPosition( - withClassName(is("android.widget.LinearLayout")), - 1), - 2))); - button3.perform(scrollTo(), click()); + onView(withId(R.id.saveButton)).perform(click()); } private static Matcher childAtPosition(