@@ -26,6 +26,7 @@ import com.flowcrypt.email.base.BaseTest
2626import com.flowcrypt.email.database.entity.PublicKeyEntity
2727import com.flowcrypt.email.database.entity.RecipientEntity
2828import com.flowcrypt.email.database.entity.relation.RecipientWithPubKeys
29+ import com.flowcrypt.email.junit.annotations.FlowCryptTestSettings
2930import com.flowcrypt.email.rules.AddAccountToDatabaseRule
3031import com.flowcrypt.email.rules.AddRecipientsToDatabaseRule
3132import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -38,19 +39,20 @@ import com.flowcrypt.email.util.TestGeneralUtil
3839import com.flowcrypt.email.viewaction.CustomViewActions.doNothing
3940import org.hamcrest.Matchers.allOf
4041import org.hamcrest.Matchers.not
41- import org.junit.Ignore
4242import org.junit.Rule
4343import org.junit.Test
4444import org.junit.rules.RuleChain
4545import org.junit.rules.TestRule
4646import org.junit.runner.RunWith
4747import java.util.UUID
48+ import java.util.concurrent.TimeUnit
4849
4950
5051/* *
5152 * @author Denys Bondarenko
5253 */
5354@MediumTest
55+ @FlowCryptTestSettings(useCommonIdling = false , useIntents = true )
5456@RunWith(AndroidJUnit4 ::class )
5557class SelectRecipientsFragmentFlowTest : BaseTest () {
5658 override val activityScenarioRule = activityScenarioRule<CreateMessageActivity >(
@@ -97,7 +99,6 @@ class SelectRecipientsFragmentFlowTest : BaseTest() {
9799 }
98100
99101 @Test
100- @Ignore(" Fix me" )
101102 fun testSearchExistingContact () {
102103 onView(withId(R .id.menuSearch))
103104 .check(matches(isDisplayed()))
@@ -113,14 +114,14 @@ class SelectRecipientsFragmentFlowTest : BaseTest() {
113114 }
114115
115116 @Test
116- @Ignore(" Fix me" )
117117 fun testNoResults () {
118118 onView(withId(R .id.menuSearch))
119119 .check(matches(isDisplayed()))
120120 .perform(click())
121121 onView(withId(getIdentifierByName(" search_src_text" )))
122122 .perform(clearText(), typeText(" some email" ))
123123 closeSoftKeyboard()
124+ waitForObjectWithText(getResString(R .string.no_results), TimeUnit .SECONDS .toMillis(10 ))
124125 onView(withId(R .id.tVEmpty))
125126 .check(matches(isDisplayed())).check(matches(withText(R .string.no_results)))
126127 }
@@ -129,6 +130,7 @@ class SelectRecipientsFragmentFlowTest : BaseTest() {
129130 onView(withId(getIdentifierByName(" search_src_text" )))
130131 .perform(clearText(), typeText(viewText))
131132 closeSoftKeyboard()
133+ waitForObjectWithText(viewText, TimeUnit .SECONDS .toMillis(10 ))
132134 onView(withId(viewId))
133135 .check(matches(isDisplayed())).check(matches(withText(viewText)))
134136 }
0 commit comments