mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 05:13:53 +01:00
[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:
parent
dcbf076965
commit
4578600c1e
12 changed files with 129 additions and 6 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue