From f274b48d68c98469e369be3d5866856495901d82 Mon Sep 17 00:00:00 2001 From: stargateprovider Date: Tue, 7 Dec 2021 00:34:15 +0200 Subject: [PATCH] update UC4Test --- .../java/com/tarkvaraprojekt/mobileauthapp/UC4Test.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/MobileAuthApp/app/src/androidTest/java/com/tarkvaraprojekt/mobileauthapp/UC4Test.kt b/MobileAuthApp/app/src/androidTest/java/com/tarkvaraprojekt/mobileauthapp/UC4Test.kt index 2bd93ca..3c03951 100644 --- a/MobileAuthApp/app/src/androidTest/java/com/tarkvaraprojekt/mobileauthapp/UC4Test.kt +++ b/MobileAuthApp/app/src/androidTest/java/com/tarkvaraprojekt/mobileauthapp/UC4Test.kt @@ -6,12 +6,9 @@ import androidx.test.espresso.IdlingPolicies import androidx.test.espresso.NoMatchingViewException import androidx.test.espresso.action.ViewActions.* import androidx.test.espresso.assertion.ViewAssertions.matches -import androidx.test.espresso.matcher.RootMatchers.* import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.rule.ActivityTestRule -import org.hamcrest.CoreMatchers.`is` -import org.hamcrest.CoreMatchers.not import org.junit.* import org.junit.runner.RunWith @@ -49,11 +46,11 @@ class UC4Test { @Test fun validCAN() { navigateToCANView() + onView(withText(R.string.can_helper_text)).check(matches(isDisplayed())) onView(supportsInputMethods()).perform(typeText("123456")) + onView(withText(R.string.can_delete)).perform(closeSoftKeyboard()) - onView(withText(R.string.can_status_saved)).inRoot( - withDecorView(not(`is`(activityActivityTestRule.activity.getWindow().getDecorView()))) - ).check(matches(isDisplayed())) + onView(withText(R.string.can_status_saved)).check(matches(isDisplayed())) } @Test