package com.cwainner.chris.recipecentral;

import android.support.test.rule.ActivityTestRule;

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

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;


public class MainActivityInstrumentationTest {

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

    @Test
    public void validateEditText(){
        onView(withId(R.id.recipeEditText)).perform(typeText("Brownies"))
                .check(matches(withText("Brownies")));
    }
}

@@ -196,16 +196,86 @@
 onView;%0A
+import static android.support.test.espresso.action.ViewActions.click;%0A
 import s
@@ -911,11 +911,360 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void textInputSentToRecipesActivity()%7B%0A        String textToInput = %22Brownies%22;%0A        onView(withId(R.id.recipeEditText)).perform(typeText(textToInput));%0A        onView(withId(R.id.getRecipesButton)).perform(click());%0A        onView(withId(R.id.recipeTypeView)).check(matches(withText(%22Recipe type: %22 + textToInput)));%0A    %7D
 %0A%7D%0A

Add instrumentation test to validate that recipe type is passed to recipes activity