File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,11 @@ class ActionViewTest {
131
131
@Test
132
132
fun verifyNavigateToSecondActivityWithMessage() {
133
133
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())
135
135
136
136
intended(allOf(
137
137
hasComponent(hasShortClassName(".SecondActivity")),
138
- toPackage(pl.androidcode.espresso),
138
+ toPackage(" pl.androidcode.espresso" ),
139
139
hasExtra(MainActivity.NAME, "value")))
140
140
}
141
141
}
@@ -146,19 +146,19 @@ Sprawdzanie stanu widoków następuje poprzez wyołanie metody `check` klasy `Vi
146
146
147
147
{% highlight kotlin %}
148
148
@RunWith (AndroidJUnit4::class)
149
- class EspressoTest {
149
+ class VerifyTest {
150
150
151
151
@get:Rule
152
152
var activityRule: ActivityTestRule<MainActivity> = ActivityTestRule(MainActivity::class.java)
153
153
154
154
@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())
159
159
160
160
//verify
161
- onView(withId(R.id.textViewName)).check(matches(withText("value" )))
161
+ onView(withId(R.id.textViewName)).check(matches(not(isDisplayed() )))
162
162
}
163
163
}
164
164
{% endhighlight %}
You can’t perform that action at this time.
0 commit comments