package ch.epfl.sweng.project;

import android.support.test.filters.LargeTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;

import com.example.android.multidex.ch.epfl.sweng.project.AppRunnest.R;

import org.junit.FixMethodOrder;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;

import ch.epfl.sweng.project.Activities.LoginActivity;

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.withId;


@RunWith(AndroidJUnit4.class)
@LargeTest
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class LoginTest {


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


   @Test
    public void loginAndLogout() {
        onView(withId(R.id.sign_in_button))
                .check(matches(isDisplayed()));
    }

    /*@Test
    public void a() {
        onView(withId(R.id.sign_in_button))
                .perform(click());
        onView(withId(R.id.fragment_container))
                .check(matches(isDisplayed()));
    }

    @Test
    public void b() {
        onView(withId(R.id.drawer_layout))
                .perform(DrawerActions.open());

        onView(withId(R.id.drawer_layout)).check(matches(isOpen()));
    }*/







}
@@ -517,16 +517,86 @@
 onView;%0A
+import static android.support.test.espresso.action.ViewActions.click;%0A
 import s
@@ -1104,33 +1104,32 @@
 gout() %7B%0A       
- 
 onView(withId(R.
@@ -1155,33 +1155,32 @@
 %0A               
- 
 .check(matches(i
@@ -1187,32 +1187,109 @@
 sDisplayed()));%0A
+       onView(withId(R.id.sign_in_button))%0A               .perform(click());%0A
     %7D%0A%0A    /*@Te

Add signIn click to LoginTest