Skip to content

Commit af3ec81

Browse files
committed
Fixed SelectRecipientsFragmentFlowTest
1 parent aa04060 commit af3ec81

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SelectRecipientsFragmentFlowTest.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import com.flowcrypt.email.base.BaseTest
2626
import com.flowcrypt.email.database.entity.PublicKeyEntity
2727
import com.flowcrypt.email.database.entity.RecipientEntity
2828
import com.flowcrypt.email.database.entity.relation.RecipientWithPubKeys
29+
import com.flowcrypt.email.junit.annotations.FlowCryptTestSettings
2930
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
3031
import com.flowcrypt.email.rules.AddRecipientsToDatabaseRule
3132
import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -38,19 +39,20 @@ import com.flowcrypt.email.util.TestGeneralUtil
3839
import com.flowcrypt.email.viewaction.CustomViewActions.doNothing
3940
import org.hamcrest.Matchers.allOf
4041
import org.hamcrest.Matchers.not
41-
import org.junit.Ignore
4242
import org.junit.Rule
4343
import org.junit.Test
4444
import org.junit.rules.RuleChain
4545
import org.junit.rules.TestRule
4646
import org.junit.runner.RunWith
4747
import 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)
5557
class 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

Comments
 (0)