[WIP] Adding Espresso test for orientation change (#2814)

* first commit

* initial commit

* added UI test for more activities

* added more tests

* improved code quality

* reverted code
This commit is contained in:
Vanshika Arora 2019-04-02 09:04:05 +05:30 committed by Vivek Maskara
parent dcbf076965
commit 4578600c1e
12 changed files with 129 additions and 6 deletions

View file

@ -11,7 +11,6 @@ import androidx.test.espresso.intent.matcher.IntentMatchers
import androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent
import androidx.test.espresso.intent.matcher.IntentMatchers.isInternal
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.filters.MediumTest
import androidx.test.rule.ActivityTestRule
import androidx.test.runner.AndroidJUnit4
import fr.free.nrw.commons.auth.LoginActivity
@ -23,8 +22,6 @@ import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@MediumTest
@RunWith(AndroidJUnit4::class)
class LoginActivityTest {
@get:Rule
@ -53,4 +50,9 @@ class LoginActivityTest {
.perform(ViewActions.click())
Intents.intended(CoreMatchers.allOf(IntentMatchers.hasAction(Intent.ACTION_VIEW), IntentMatchers.hasData(BuildConfig.FORGOT_PASSWORD_URL)));
}
@Test
fun orientationChange() {
UITestHelper.changeOrientation(activityRule)
}
}