File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,11 @@ class ActionViewTest {
131131 @Test
132132 fun verifyNavigateToSecondActivityWithMessage() {
133133 onView(withId(R.id.editTextName)).perform(typeText("value"))
134- onView(withId(R.id.buttonNavigate)).perform(click())
134+ onView(withId(R.id.buttonNavigate)).perform(closeSoftKeyboard(), click())
135135
136136 intended(allOf(
137137 hasComponent(hasShortClassName(".SecondActivity")),
138- toPackage(pl.androidcode.espresso),
138+ toPackage(" pl.androidcode.espresso" ),
139139 hasExtra(MainActivity.NAME, "value")))
140140 }
141141}
@@ -146,19 +146,19 @@ Sprawdzanie stanu widoków następuje poprzez wyołanie metody `check` klasy `Vi
146146
147147{% highlight kotlin %}
148148@RunWith (AndroidJUnit4::class)
149- class EspressoTest {
149+ class VerifyTest {
150150
151151 @get:Rule
152152 var activityRule: ActivityTestRule<MainActivity> = ActivityTestRule(MainActivity::class.java)
153153
154154 @Test
155- fun verifyChangedText () {
156- //actions
157- onView(withId(R.id.editTextName)).perform(typeText("value "))
158- onView(withId(R.id.buttonAction)).perform(click()) //do action
155+ fun verifyHideTextViewWhenHideTextTyped () {
156+ //actions
157+ onView(withId(R.id.editTextName)).perform(typeText("hide "))
158+ onView(withId(R.id.buttonAction)).perform(click())
159159
160160 //verify
161- onView(withId(R.id.textViewName)).check(matches(withText("value" )))
161+ onView(withId(R.id.textViewName)).check(matches(not(isDisplayed() )))
162162 }
163163}
164164{% endhighlight %}
You can’t perform that action at this time.
0 commit comments