From f01f4fbdfaecdef3977803d6500bcd23b5935244 Mon Sep 17 00:00:00 2001 From: Robin Koedood Date: Wed, 6 Jan 2021 19:43:21 +0100 Subject: [PATCH] [FIXED] CouponFragment test with string resource --- .../java/com/a1/nextlocation/CouponFragmentTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/androidTest/java/com/a1/nextlocation/CouponFragmentTest.java b/app/src/androidTest/java/com/a1/nextlocation/CouponFragmentTest.java index d0aeb9a..d06e02c 100644 --- a/app/src/androidTest/java/com/a1/nextlocation/CouponFragmentTest.java +++ b/app/src/androidTest/java/com/a1/nextlocation/CouponFragmentTest.java @@ -41,8 +41,8 @@ public class CouponFragmentTest { //the button "Klaar" is shown then the test works mActivityTestRule.getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.mainActivity, new CouponFragment()).commit(); onView(withId(R.id.coupon_recyclerview)).perform(RecyclerViewActions.actionOnItemAtPosition(1, click())); - onView(withId(R.string.activate)).inRoot(RootMatchers.isDialog()).perform(click()); - onView(withId(R.string.done)).inRoot(RootMatchers.isDialog()).check(matches(isDisplayed())); + onView(withText(R.string.activate)).inRoot(RootMatchers.isDialog()).perform(click()); + onView(withText(R.string.done)).inRoot(RootMatchers.isDialog()).check(matches(isDisplayed())); }