package es.craftsmanship.toledo.katangapp;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;

import es.craftsmanship.toledo.katangapp.activities.MainActivity;

import android.support.test.rule.ActivityTestRule;

import org.junit.Rule;
import org.junit.Test;

/**
 * @author Cristóbal Hermida
 */
public class ApplicationTest {

    @Rule
    public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule(MainActivity.class);

    public ApplicationTest() {
        super();
    }

    @Test
    public void titleIsDisplayed() {
        onView(withText("katanga")).check(matches(isDisplayed()));
    }

}
@@ -37,16 +37,182 @@
 ngapp;%0A%0A
+import android.support.test.rule.ActivityTestRule;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0Aimport es.craftsmanship.toledo.katangapp.activities.MainActivity;%0A%0A
 import s
@@ -264,16 +264,16 @@
 onView;%0A
-
 import s
@@ -500,174 +500,8 @@
 t;%0A%0A
-import es.craftsmanship.toledo.katangapp.activities.MainActivity;%0A%0Aimport android.support.test.rule.ActivityTestRule;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0A
 /**%0A
@@ -741,16 +741,16 @@
   @Test%0A
-
     publ
@@ -774,24 +774,156 @@
 splayed() %7B%0A
+        try %7B%0A            Thread.sleep(5000);%0A        %7D catch (InterruptedException e) %7B%0A            e.printStackTrace();%0A        %7D%0A
         onVi

add Thread.sleep(5000) before executing the test