Skip to content

Commit 3322dee

Browse files
committed
Fixed some tests
1 parent 15853cc commit 3322dee

5 files changed

Lines changed: 4 additions & 14 deletions

FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/AddOtherAccountFragmentInIsolationTest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import androidx.test.espresso.Espresso.onView
1010
import androidx.test.espresso.action.ViewActions.clearText
1111
import androidx.test.espresso.action.ViewActions.click
1212
import androidx.test.espresso.action.ViewActions.closeSoftKeyboard
13+
import androidx.test.espresso.action.ViewActions.replaceText
1314
import androidx.test.espresso.action.ViewActions.scrollTo
1415
import androidx.test.espresso.action.ViewActions.typeText
1516
import androidx.test.espresso.assertion.ViewAssertions.matches
@@ -39,7 +40,6 @@ import org.hamcrest.Matchers.instanceOf
3940
import org.hamcrest.Matchers.`is`
4041
import org.hamcrest.Matchers.not
4142
import org.junit.Before
42-
import org.junit.Ignore
4343
import org.junit.Rule
4444
import org.junit.Test
4545
import org.junit.rules.RuleChain
@@ -68,7 +68,6 @@ class AddOtherAccountFragmentInIsolationTest : AddOtherAccountBaseTest() {
6868
}
6969

7070
@Test
71-
@Ignore("need to fix")
7271
fun testShowSnackBarIfFieldEmpty() {
7372
onView(withId(R.id.checkBoxAdvancedMode))
7473
.perform(scrollTo(), click())
@@ -281,9 +280,9 @@ class AddOtherAccountFragmentInIsolationTest : AddOtherAccountBaseTest() {
281280

282281
private fun checkIsFieldEmptyWork(viewId: Int, stringIdForError: Int) {
283282
onView(withId(R.id.editTextEmail))
284-
.perform(scrollTo(), clearText(), typeText(authCreds.email), closeSoftKeyboard())
283+
.perform(scrollTo(), replaceText(authCreds.email), closeSoftKeyboard())
285284
onView(withId(R.id.editTextPassword))
286-
.perform(clearText(), typeText(authCreds.password), closeSoftKeyboard())
285+
.perform(replaceText(authCreds.password), closeSoftKeyboard())
287286

288287
onView(withId(viewId))
289288
.perform(scrollTo(), clearText())

FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/passwordprotected/BaseComposeScreenPasswordProtectedDisallowedTermsTest.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ open class BaseComposeScreenPasswordProtectedDisallowedTermsTest(
6666
).perform(click())
6767

6868
onView(withId(R.id.eTPassphrase))
69-
.perform(
70-
replaceText(PASSWORD),
71-
closeSoftKeyboard()
72-
)
69+
.perform(replaceText(PASSWORD))
7370

7471
onView(withId(R.id.btSetPassword))
7572
.perform(click())

FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/passwordprotected/ComposeScreenPasswordProtectedDisallowedTermsErrorTextMissingFlowTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import com.flowcrypt.email.rules.ClearAppSettingsRule
2222
import com.flowcrypt.email.rules.GrantPermissionRuleChooser
2323
import com.flowcrypt.email.rules.RetryRule
2424
import com.flowcrypt.email.rules.ScreenshotTestRule
25-
import org.junit.Ignore
2625
import org.junit.Rule
2726
import org.junit.Test
2827
import org.junit.rules.RuleChain
@@ -62,7 +61,6 @@ class ComposeScreenPasswordProtectedDisallowedTermsErrorTextMissingFlowTest :
6261
.around(ScreenshotTestRule())
6362

6463
@Test
65-
@Ignore("need to fix")
6664
fun testMissingOptionalPropertiesInClientConfiguration() {
6765
onView(withId(R.id.menuActionSend))
6866
.check(matches(isDisplayed()))

FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/passwordprotected/ComposeScreenPasswordProtectedDisallowedTermsMissingTermsFlowTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import com.flowcrypt.email.rules.ClearAppSettingsRule
2222
import com.flowcrypt.email.rules.GrantPermissionRuleChooser
2323
import com.flowcrypt.email.rules.RetryRule
2424
import com.flowcrypt.email.rules.ScreenshotTestRule
25-
import org.junit.Ignore
2625
import org.junit.Rule
2726
import org.junit.Test
2827
import org.junit.rules.RuleChain
@@ -62,7 +61,6 @@ class ComposeScreenPasswordProtectedDisallowedTermsMissingTermsFlowTest :
6261
.around(ScreenshotTestRule())
6362

6463
@Test
65-
@Ignore("need to fix")
6664
fun testMissingOptionalPropertiesInClientConfiguration() {
6765
onView(withId(R.id.menuActionSend))
6866
.check(matches(isDisplayed()))

FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/passwordprotected/ComposeScreenPasswordProtectedDisallowedTermsNullFlowTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import com.flowcrypt.email.rules.ClearAppSettingsRule
2222
import com.flowcrypt.email.rules.GrantPermissionRuleChooser
2323
import com.flowcrypt.email.rules.RetryRule
2424
import com.flowcrypt.email.rules.ScreenshotTestRule
25-
import org.junit.Ignore
2625
import org.junit.Rule
2726
import org.junit.Test
2827
import org.junit.rules.RuleChain
@@ -62,7 +61,6 @@ class ComposeScreenPasswordProtectedDisallowedTermsNullFlowTest :
6261
.around(ScreenshotTestRule())
6362

6463
@Test
65-
@Ignore("need to fix")
6664
fun testMissingOptionalPropertiesInClientConfiguration() {
6765
onView(withId(R.id.menuActionSend))
6866
.check(matches(isDisplayed()))

0 commit comments

Comments
 (0)