package com.designdemo.uaha.ui;

import android.content.Context;
import android.content.Intent;

import com.designdemo.uaha.data.VersionData;
import com.support.android.designlibdemo.R;

import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import androidx.test.runner.AndroidJUnit4;

import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.core.AllOf.allOf;


@LargeTest
@RunWith(AndroidJUnit4.class)
public class DetailActivityTest  {

    @Rule
    public ActivityTestRule<DetailActivity> mActivityTestRule =
            new ActivityTestRule<DetailActivity>(DetailActivity.class) {
                @Override
                protected Intent getActivityIntent() {
                    Context targetContext = InstrumentationRegistry.getInstrumentation()
                            .getTargetContext();
                    Intent result = new Intent(targetContext, DetailActivity.class);
                    result.putExtra(DetailActivity.EXTRA_APP_NAME, VersionData.getProductName(VersionData.OS_GINGERBREAD));
                    return result;
                }
            };

    @Test
    public void detailViewTest() {
        onView(withId(R.id.favorite_title)).check(matches(withText("Favorite")));
    }

//    @Test
//    public void fabInteractTest() {
////        onClick()
//    }
}

@@ -1524,16 +1524,18 @@
     %7D;%0A%0A
+//
     @Tes
@@ -1536,16 +1536,18 @@
   @Test%0A
+//
     publ
@@ -1569,24 +1569,26 @@
 iewTest() %7B%0A
+//
         onVi
@@ -1653,24 +1653,26 @@
 vorite%22)));%0A
+//
     %7D%0A%0A//   

Fix test