update test

This commit is contained in:
stargateprovider 2021-12-06 23:58:46 +02:00
parent e4a06b4fc9
commit 515eea14bb

View File

@ -1,6 +1,6 @@
package com.tarkvaraprojekt.mobileauthapp package com.tarkvaraprojekt.mobileauthapp
import androidx.fragment.app.testing.launchFragmentInContainer //import androidx.fragment.app.testing.launchFragmentInContainer
import androidx.test.espresso.Espresso.onView import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingPolicies import androidx.test.espresso.IdlingPolicies
import androidx.test.espresso.NoMatchingViewException import androidx.test.espresso.NoMatchingViewException
@ -50,7 +50,6 @@ class UC4Test {
fun validCAN() { fun validCAN() {
navigateToCANView() navigateToCANView()
onView(supportsInputMethods()).perform(typeText("123456")) onView(supportsInputMethods()).perform(typeText("123456"))
onView(withId(R.id.next_button)).perform(click())
onView(withText(R.string.can_status_saved)).inRoot( onView(withText(R.string.can_status_saved)).inRoot(
withDecorView(not(`is`(activityActivityTestRule.activity.getWindow().getDecorView()))) withDecorView(not(`is`(activityActivityTestRule.activity.getWindow().getDecorView())))
@ -61,11 +60,6 @@ class UC4Test {
fun invalidCAN() { fun invalidCAN() {
navigateToCANView() navigateToCANView()
onView(supportsInputMethods()).perform(typeText("12345")) onView(supportsInputMethods()).perform(typeText("12345"))
onView(withId(R.id.next_button)).perform(click()) onView(withText(R.string.can_helper_text)).check(matches(isDisplayed()))
onView(withText(R.string.length_can)).inRoot(
withDecorView(not(`is`(activityActivityTestRule.activity.getWindow().getDecorView())))
).check(matches(isDisplayed()))
onView(withId(R.id.next_button)).check(matches(isDisplayed()))
} }
} }