Skip to content

Commit

Permalink
Modified SearchMessagesActivityTest.| #1116
Browse files Browse the repository at this point in the history
  • Loading branch information
DenBond7 committed Apr 1, 2021
1 parent ff2ff73 commit c4e61c6
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {

@Before
fun waitData() {
// Need to improve this code after espresso updates
//todo-denbond7 Need to improve this code after espresso updates
Thread.sleep(2000)
}

Expand All @@ -98,6 +98,8 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {
onView(isAssignableFrom(EditText::class.java))
.check(matches(withText(DEFAULT_QUERY_TEXT)))
.perform(clearText(), typeText(SECOND_QUERY_TEXT), pressImeActionButton())
//todo-denbond7 Need to improve this code
Thread.sleep(2000)
onView(withId(R.id.rVMsgs))
.check(matches(withRecyclerViewItemCount(2))).check(matches(isDisplayed()))
}
Expand All @@ -110,6 +112,8 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {
onView(isAssignableFrom(EditText::class.java))
.check(matches(withText(DEFAULT_QUERY_TEXT)))
.perform(clearText(), typeText(QUERY_TEXT_FOR_SUBJECT_BODY_FROM), pressImeActionButton())
//todo-denbond7 Need to improve this code
Thread.sleep(2000)
onView(withId(R.id.rVMsgs))
.check(matches(withRecyclerViewItemCount(4))).check(matches(isDisplayed()))
}
Expand Down Expand Up @@ -137,8 +141,13 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {
.check(matches(isDisplayed()))
.perform(click())
onView(isAssignableFrom(EditText::class.java))
.perform(clearText(), typeText("The string with no results"), pressImeActionButton())
onView(withId(R.id.emptyView))
.perform(
clearText(),
typeText("The string with no results"),
pressImeActionButton())
//todo-denbond7 Need to improve this code
Thread.sleep(2000)
onView(withId(R.id.tVEmpty))
.check(matches(isDisplayed()))
}

Expand Down

1 comment on commit c4e61c6

@DenBond7
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It relates to #1108

Please sign in to comment.