From 05e075556fec0ca08aa61e60ee65c56707001029 Mon Sep 17 00:00:00 2001 From: Yusuke Matsubara Date: Wed, 14 Jun 2017 22:15:44 +0900 Subject: [PATCH] Use localized message in NearbyActivityTest --- .../fr/free/nrw/commons/NearbyActivityTest.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/androidTest/java/fr/free/nrw/commons/NearbyActivityTest.java b/app/src/androidTest/java/fr/free/nrw/commons/NearbyActivityTest.java index 2ac5284e9..f9ec72569 100644 --- a/app/src/androidTest/java/fr/free/nrw/commons/NearbyActivityTest.java +++ b/app/src/androidTest/java/fr/free/nrw/commons/NearbyActivityTest.java @@ -1,20 +1,20 @@ package fr.free.nrw.commons; -import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; -import static android.support.test.espresso.matcher.ViewMatchers.withText; - import android.support.test.espresso.assertion.ViewAssertions; import android.support.test.filters.LargeTest; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; -import fr.free.nrw.commons.nearby.NearbyActivity; - import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; +import fr.free.nrw.commons.nearby.NearbyActivity; + +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; +import static android.support.test.espresso.matcher.ViewMatchers.withText; + @LargeTest @RunWith(AndroidJUnit4.class) public class NearbyActivityTest { @@ -24,6 +24,7 @@ public class NearbyActivityTest { @Test public void testActivityLaunch() { - onView(withText("Nearby Places")).check(ViewAssertions.matches(isDisplayed())); + onView(withText(R.string.title_activity_nearby)) + .check(ViewAssertions.matches(isDisplayed())); } }