run passing locally

This commit is contained in:
siddharth2010 2018-08-04 15:14:24 +05:30 committed by Isaac Hutt
parent 46779565ed
commit e2a0331561

View File

@ -20,6 +20,7 @@ package org.kiwix.kiwixmobile.help;
import android.Manifest;
import android.content.Context;
import android.content.Intent;
import android.support.test.espresso.IdlingRegistry;
import android.support.test.espresso.ViewInteraction;
import android.support.test.espresso.intent.Intents;
@ -46,6 +47,8 @@ import org.kiwix.kiwixmobile.main.MainActivity;
import org.kiwix.kiwixmobile.splash.SplashActivity;
import org.kiwix.kiwixmobile.zim_manager.library_view.LibraryFragment;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasAction;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasComponent;
import static org.hamcrest.Matchers.containsString;
import static org.kiwix.kiwixmobile.testutils.Matcher.childAtPosition;
import static android.support.test.InstrumentationRegistry.getInstrumentation;
@ -63,6 +66,7 @@ import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.is;
import static android.support.test.espresso.intent.Intents.intended;
import static org.hamcrest.core.IsNull.notNullValue;
import static org.kiwix.kiwixmobile.testutils.TestUtils.TEST_PAUSE_MS;
@ -119,7 +123,7 @@ public class HelpActivityTest {
// Verify that the home activity is opened
onView(childAtPosition(withId(R.id.toolbar), 0)).check(matches(withText("Wikipedia")));
ViewInteraction recyclerView = onView(
allOf(withId(R.id.recycler_view),
childAtPosition(
@ -137,7 +141,7 @@ public class HelpActivityTest {
// Verify that the help Activity is opened
onView(withId(R.id.title)).check(matches(withText("Help")))
//TODO: fix onView(withId(R.id.title)).check(matches(withText("Help")));
// Verify that the back button is displayed
onView(withContentDescription("Navigate up")).check(matches(notNullValue()));
@ -182,9 +186,7 @@ public class HelpActivityTest {
BaristaSleepInteractions.sleep(TEST_PAUSE_MS);
intended(hasAction(Intent.ACTION_SENDTO));
}
@After