diff --git a/.idea/runConfigurations/Print_not_ready_for_CI_tests.xml b/.idea/runConfigurations/Print_not_ready_for_CI_tests.xml
new file mode 100644
index 0000000000..aedf738de9
--- /dev/null
+++ b/.idea/runConfigurations/Print_not_ready_for_CI_tests.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/Print_other_tests.xml b/.idea/runConfigurations/Print_tests_ready_for_CI.xml
similarity index 92%
rename from .idea/runConfigurations/Print_other_tests.xml
rename to .idea/runConfigurations/Print_tests_ready_for_CI.xml
index c5dad394d6..83aa7bd262 100644
--- a/.idea/runConfigurations/Print_other_tests.xml
+++ b/.idea/runConfigurations/Print_tests_ready_for_CI.xml
@@ -1,12 +1,12 @@
-
+
-
+
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/CICandidateAnnotation.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/CICandidateAnnotation.kt
deleted file mode 100644
index 2b64b196c3..0000000000
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/CICandidateAnnotation.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
- * Contributors: DenBond7
- */
-
-package com.flowcrypt.email
-
-/**
- * Via this annotation, we can mark a class or a method that can be run on CI but fails for now.
- * Thanks to this annotation we can run all such methods by one call via the command line to check them.
- *
- * @author Denis Bondarenko
- * Date: 9/23/20
- * Time: 8:21 AM
- * E-mail: DenBond7@gmail.com
- */
-@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
-annotation class CICandidateAnnotation
\ No newline at end of file
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/DebugTestingTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/DebugTestingTest.kt
index 74682c7673..05287a40d1 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/DebugTestingTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/DebugTestingTest.kt
@@ -7,6 +7,7 @@ package com.flowcrypt.email
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.flowcrypt.email.junit.annotations.DebugTest
import org.junit.Test
import org.junit.runner.RunWith
@@ -17,7 +18,7 @@ import org.junit.runner.RunWith
* E-mail: DenBond7@gmail.com
*/
@SmallTest
-@DebugTestAnnotation
+@DebugTest
@RunWith(AndroidJUnit4::class)
class DebugTestingTest {
@Test
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/database/MigrationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/database/MigrationTest.kt
index 0f3900a2eb..ebad995011 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/database/MigrationTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/database/MigrationTest.kt
@@ -11,8 +11,6 @@ import androidx.sqlite.db.framework.FrameworkSQLiteOpenHelperFactory
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.DoesNotNeedMailserver
-import com.flowcrypt.email.ReadyForCIAnnotation
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
@@ -46,8 +44,6 @@ class MigrationTest {
)
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
@Throws(IOException::class)
fun testAllMigrations() {
// Create earliest version of the database.
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/DebugTestAnnotation.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/annotations/DebugTest.kt
similarity index 83%
rename from FlowCrypt/src/androidTest/java/com/flowcrypt/email/DebugTestAnnotation.kt
rename to FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/annotations/DebugTest.kt
index f3b46b90bf..31a4bd19d5 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/DebugTestAnnotation.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/annotations/DebugTest.kt
@@ -3,7 +3,7 @@
* Contributors: DenBond7
*/
-package com.flowcrypt.email
+package com.flowcrypt.email.junit.annotations
/**
* This annotation was created for debugging purposes
@@ -14,4 +14,4 @@ package com.flowcrypt.email
* E-mail: DenBond7@gmail.com
*/
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
-annotation class DebugTestAnnotation
\ No newline at end of file
+annotation class DebugTest
\ No newline at end of file
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/DoesNotNeedMailserver.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/annotations/DependsOnMailServer.kt
similarity index 72%
rename from FlowCrypt/src/androidTest/java/com/flowcrypt/email/DoesNotNeedMailserver.kt
rename to FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/annotations/DependsOnMailServer.kt
index 72af327f21..d3579be111 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/DoesNotNeedMailserver.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/annotations/DependsOnMailServer.kt
@@ -3,11 +3,11 @@
* Contributors: DenBond7
*/
-package com.flowcrypt.email
+package com.flowcrypt.email.junit.annotations
/**
- * This annotation indicates that a whole class or a single method doesn't need an email server for successful
- * completion.
+ * This annotation indicates that a whole class or a single method depends on an email server
+ * for successful completion.
*
* @author Denis Bondarenko
* Date: 7/11/19
@@ -15,4 +15,4 @@ package com.flowcrypt.email
* E-mail: DenBond7@gmail.com
*/
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
-annotation class DoesNotNeedMailserver
\ No newline at end of file
+annotation class DependsOnMailServer
\ No newline at end of file
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ReadyForCIAnnotation.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/annotations/NotReadyForCI.kt
similarity index 82%
rename from FlowCrypt/src/androidTest/java/com/flowcrypt/email/ReadyForCIAnnotation.kt
rename to FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/annotations/NotReadyForCI.kt
index 8be199c5c3..d71a92caf5 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ReadyForCIAnnotation.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/annotations/NotReadyForCI.kt
@@ -3,10 +3,10 @@
* Contributors: DenBond7
*/
-package com.flowcrypt.email
+package com.flowcrypt.email.junit.annotations
/**
- * Via this annotation, we can mark a class or a method that can be run on CI.
+ * Via this annotation, we can mark a class or a method that can't be run on CI yet.
* Thanks to this annotation we can run all such methods by one call via the command line to check them.
*
* @author Denis Bondarenko
@@ -15,4 +15,4 @@ package com.flowcrypt.email
* E-mail: DenBond7@gmail.com
*/
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
-annotation class ReadyForCIAnnotation
\ No newline at end of file
+annotation class NotReadyForCI
\ No newline at end of file
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/DependsOnMailServerFilter.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/DependsOnMailServerFilter.kt
index 38fc8a2a29..f9c2435253 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/DependsOnMailServerFilter.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/DependsOnMailServerFilter.kt
@@ -5,7 +5,7 @@
package com.flowcrypt.email.junit.filters
-import com.flowcrypt.email.DoesNotNeedMailserver
+import com.flowcrypt.email.junit.annotations.DependsOnMailServer
import org.junit.runner.Description
/**
@@ -16,10 +16,10 @@ import org.junit.runner.Description
*/
class DependsOnMailServerFilter : ReadyForCIFilter() {
override fun evaluateTest(description: Description?): Boolean {
- val annotationClass = DoesNotNeedMailserver::class.java
- val hasClassAnnotation = description?.testClass?.isAnnotationPresent(annotationClass) == true
- if (hasClassAnnotation) return false
- return super.evaluateTest(description) && description?.getAnnotation(annotationClass) == null
+ val annotationClass = DependsOnMailServer::class.java
+ return super.evaluateTest(description)
+ && (description?.testClass?.isAnnotationPresent(annotationClass) == true
+ || description?.getAnnotation(annotationClass) != null)
}
override fun describe() = "Filter tests that depend on an email server"
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/DoesNotNeedMailServerFilter.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/DoesNotNeedMailServerFilter.kt
index 88c7e66e72..69b3621d2d 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/DoesNotNeedMailServerFilter.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/DoesNotNeedMailServerFilter.kt
@@ -5,7 +5,7 @@
package com.flowcrypt.email.junit.filters
-import com.flowcrypt.email.DoesNotNeedMailserver
+import com.flowcrypt.email.junit.annotations.DependsOnMailServer
import org.junit.runner.Description
/**
@@ -16,10 +16,10 @@ import org.junit.runner.Description
*/
class DoesNotNeedMailServerFilter : ReadyForCIFilter() {
override fun evaluateTest(description: Description?): Boolean {
- val annotationClass = DoesNotNeedMailserver::class.java
- return super.evaluateTest(description)
- && (description?.testClass?.isAnnotationPresent(annotationClass) == true
- || description?.getAnnotation(annotationClass) != null)
+ val annotationClass = DependsOnMailServer::class.java
+ val hasClassAnnotation = description?.testClass?.isAnnotationPresent(annotationClass) == true
+ if (hasClassAnnotation) return false
+ return super.evaluateTest(description) && description?.getAnnotation(annotationClass) == null
}
override fun describe() = "Filter tests that don't need an email server"
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/NotReadyForCIFilter.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/NotReadyForCIFilter.kt
new file mode 100644
index 0000000000..13750cc661
--- /dev/null
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/NotReadyForCIFilter.kt
@@ -0,0 +1,26 @@
+/*
+ * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
+ * Contributors: DenBond7
+ */
+
+package com.flowcrypt.email.junit.filters
+
+import androidx.test.internal.runner.filters.ParentFilter
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
+import org.junit.runner.Description
+
+/**
+ * @author Denis Bondarenko
+ * Date: 2/17/21
+ * Time: 5:24 PM
+ * E-mail: DenBond7@gmail.com
+ */
+open class NotReadyForCIFilter : ParentFilter() {
+ override fun evaluateTest(description: Description?): Boolean {
+ val annotationClass = NotReadyForCI::class.java
+ return (description?.testClass?.isAnnotationPresent(annotationClass) == true
+ || description?.getAnnotation(annotationClass) != null)
+ }
+
+ override fun describe() = "Filter tests that can't be run on CI yet"
+}
\ No newline at end of file
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/ReadyForCIFilter.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/ReadyForCIFilter.kt
index 8dbfd777a5..a41085d5ed 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/ReadyForCIFilter.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/junit/filters/ReadyForCIFilter.kt
@@ -6,7 +6,7 @@
package com.flowcrypt.email.junit.filters
import androidx.test.internal.runner.filters.ParentFilter
-import com.flowcrypt.email.ReadyForCIAnnotation
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import org.junit.runner.Description
/**
@@ -17,8 +17,8 @@ import org.junit.runner.Description
*/
open class ReadyForCIFilter : ParentFilter() {
override fun evaluateTest(description: Description?): Boolean {
- val annotationClass = ReadyForCIAnnotation::class.java
- return (description?.testClass?.isAnnotationPresent(annotationClass) == true || description?.getAnnotation(annotationClass) != null)
+ val annotationClass = NotReadyForCI::class.java
+ return (description?.testClass?.isAnnotationPresent(annotationClass) == false && description.getAnnotation(annotationClass) == null)
}
override fun describe() = "Filter tests that are ready to be run on a CI server"
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/security/KeyStoreCryptoManagerTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/security/KeyStoreCryptoManagerTest.kt
index c550b9be27..7a934b8c0e 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/security/KeyStoreCryptoManagerTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/security/KeyStoreCryptoManagerTest.kt
@@ -11,8 +11,6 @@ import android.util.Base64OutputStream
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.DoesNotNeedMailserver
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.api.email.MsgsCacheManager
import com.flowcrypt.email.util.exception.SyncTaskTerminatedException
import okio.buffer
@@ -53,8 +51,6 @@ class KeyStoreCryptoManagerTest {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testDataAsString() {
val encryptedData = KeyStoreCryptoManager.encrypt(originalData)
println(encryptedData)
@@ -64,8 +60,6 @@ class KeyStoreCryptoManagerTest {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testDataAsStream() {
val msg = MimeMessage(Session.getInstance(Properties()), InstrumentationRegistry
.getInstrumentation().context.assets.open("messages/mime/standard_msg_info_plain_text.txt"))
@@ -105,8 +99,6 @@ class KeyStoreCryptoManagerTest {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testDataAsStreamFromCacheManager() {
val msg = MimeMessage(Session.getInstance(Properties()), InstrumentationRegistry
.getInstrumentation().context.assets.open("messages/mime/standard_msg_info_plain_text.txt"))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/AddOtherAccountFragmentTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/AddOtherAccountFragmentTest.kt
index bd7f500354..f1fff6deaf 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/AddOtherAccountFragmentTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/AddOtherAccountFragmentTest.kt
@@ -21,15 +21,14 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.CICandidateAnnotation
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.api.email.JavaEmailConstants
import com.flowcrypt.email.api.email.model.AuthCredentials
import com.flowcrypt.email.api.email.model.SecurityType
import com.flowcrypt.email.base.BaseTest
+import com.flowcrypt.email.junit.annotations.DependsOnMailServer
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withSecurityTypeOption
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.RetryRule
@@ -82,8 +81,6 @@ class AddOtherAccountFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowSnackBarIfFieldEmpty() {
onView(withId(R.id.checkBoxAdvancedMode))
.perform(scrollTo(), click())
@@ -109,8 +106,6 @@ class AddOtherAccountFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testIsPasswordFieldsAlwaysEmptyAtStart() {
onView(withId(R.id.editTextPassword))
.check(matches(withText(isEmptyString())))
@@ -122,8 +117,6 @@ class AddOtherAccountFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testChangingImapPortWhenSelectSpinnerItem() {
enableAdvancedMode()
checkSecurityTypeOpt(R.id.editTextImapPort, R.id.spinnerImapSecurityType,
@@ -135,8 +128,6 @@ class AddOtherAccountFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testChangingSmtpPortWhenSelectSpinnerItem() {
enableAdvancedMode()
checkSecurityTypeOpt(R.id.editTextSmtpPort, R.id.spinnerSmtpSecyrityType,
@@ -148,7 +139,7 @@ class AddOtherAccountFragmentTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testChangeFieldValuesWhenEmailChanged() {
enableAdvancedMode()
@@ -190,8 +181,6 @@ class AddOtherAccountFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testVisibilityOfSmtpAuthField() {
enableAdvancedMode()
@@ -213,8 +202,6 @@ class AddOtherAccountFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testFieldsAutoFilling() {
enableAdvancedMode()
@@ -253,7 +240,7 @@ class AddOtherAccountFragmentTest : BaseTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testWrongFormatOfEmailAddress() {
enableAdvancedMode()
fillAllFields(authCreds)
@@ -274,7 +261,7 @@ class AddOtherAccountFragmentTest : BaseTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
@Ignore("failed on CI")
fun testShowWarningIfAuthFail() {
enableAdvancedMode()
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/AttesterSettingsActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/AttesterSettingsActivityTest.kt
index 702ab43f83..30718e655f 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/AttesterSettingsActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/AttesterSettingsActivityTest.kt
@@ -12,11 +12,10 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.CICandidateAnnotation
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.base.BaseTest
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withEmptyRecyclerView
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -58,8 +57,7 @@ class AttesterSettingsActivityTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @CICandidateAnnotation
+ @NotReadyForCI
fun testKeysExistOnAttester() {
onView(withId(R.id.rVAttester))
.check(matches(not(withEmptyRecyclerView()))).check(matches(isDisplayed()))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/BackupKeysActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/BackupKeysActivityTest.kt
index cc7060da0a..cf40f62282 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/BackupKeysActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/BackupKeysActivityTest.kt
@@ -26,11 +26,10 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.flowcrypt.email.Constants
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.base.BaseTest
+import com.flowcrypt.email.junit.annotations.DependsOnMailServer
import com.flowcrypt.email.model.KeyDetails
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -73,8 +72,6 @@ class BackupKeysActivityTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEmailOptionHint() {
onView(withId(R.id.radioButtonEmail))
.check(matches(isDisplayed()))
@@ -84,8 +81,6 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testDownloadOptionHint() {
onView(withId(R.id.radioButtonDownload))
.check(matches(isDisplayed()))
@@ -95,8 +90,6 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testNoKeysEmailOption() {
onView(withId(R.id.radioButtonEmail))
.check(matches(isDisplayed()))
@@ -109,8 +102,6 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testNoKeysDownloadOption() {
onView(withId(R.id.radioButtonDownload))
.check(matches(isDisplayed()))
@@ -123,7 +114,7 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testSuccessEmailOption() {
addFirstKeyWithStrongPassword()
onView(withId(R.id.buttonBackupAction))
@@ -133,15 +124,13 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testSuccessWithTwoKeysEmailOption() {
addSecondKeyWithStrongPassword()
testSuccessEmailOption()
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSuccessDownloadOption() {
addFirstKeyWithStrongPassword()
onView(withId(R.id.radioButtonDownload))
@@ -161,16 +150,12 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSuccessWithTwoKeysDownloadOption() {
addSecondKeyWithStrongPassword()
testSuccessDownloadOption()
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowWeakPasswordHintForDownloadOption() {
addFirstKeyWithDefaultPassword()
onView(withId(R.id.radioButtonDownload))
@@ -185,7 +170,7 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testShowWeakPasswordHintForEmailOption() {
addFirstKeyWithDefaultPassword()
onView(withId(R.id.buttonBackupAction))
@@ -196,8 +181,6 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testFixWeakPasswordForDownloadOption() {
addFirstKeyWithDefaultPassword()
onView(withId(R.id.radioButtonDownload))
@@ -215,7 +198,7 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testFixWeakPasswordForEmailOption() {
addFirstKeyWithDefaultPassword()
onView(withId(R.id.buttonBackupAction))
@@ -228,7 +211,7 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testDiffPassphrasesForEmailOption() {
addFirstKeyWithStrongPassword()
addSecondKeyWithStrongSecondPassword()
@@ -242,8 +225,6 @@ class BackupKeysActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testDiffPassphrasesForDownloadOption() {
addFirstKeyWithStrongPassword()
addSecondKeyWithStrongSecondPassword()
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ChangePassPhraseActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ChangePassPhraseActivityTest.kt
index bb490ba070..115bce9bf5 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ChangePassPhraseActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ChangePassPhraseActivityTest.kt
@@ -17,7 +17,7 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
+import com.flowcrypt.email.junit.annotations.DependsOnMailServer
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
import com.flowcrypt.email.rules.AddPrivateKeyToDatabaseRule
import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -55,7 +55,7 @@ class ChangePassPhraseActivityTest : BasePassphraseActivityTest() {
.around(ScreenshotTestRule())
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testUseCorrectPassPhrase() {
onView(withId(R.id.editTextKeyPassword))
.check(matches(isDisplayed()))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityTestMultiBackups.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityTestMultiBackups.kt
index bd2b94cc5c..71a0110fbe 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityTestMultiBackups.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityTestMultiBackups.kt
@@ -19,9 +19,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.model.KeyDetails
@@ -61,8 +59,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* There are two keys (all keys are different and have different pass phrases). Only one key from two keys is using.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseTwoKeysFirstCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
@@ -79,8 +75,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* There are two keys (all keys are different and have different pass phrases). All keys are checking in the queue.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseTwoKeysSecondCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
@@ -99,8 +93,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* There are two keys with the same pass phrase. All keys will be imported per one transaction.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseTwoKeysWithSamePasswordThirdCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
@@ -118,8 +110,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* [TestConstants.DEFAULT_PASSWORD].
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseTwoKeysFourthCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyC_default.asc",
@@ -137,8 +127,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* [TestConstants.DEFAULT_STRONG_PASSWORD]
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseTwoKeysFifthCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyC_default.asc",
@@ -156,8 +144,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* key with a unique pass phrase.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseThreeFirstCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
@@ -176,8 +162,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* with the same pass phrase.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseThreeKeysSecondCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
@@ -196,8 +180,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* with a unique pass phrase, and then the remaining keys.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseThreeKeysThirdCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
@@ -218,8 +200,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* keys with the same pass phrase, and then the remaining key.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseThreeKeysFourthCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
@@ -240,8 +220,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* pass phrase). Will be used one of the identical keys with a unique pass phrase.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseThreeKeysFifthCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyB_default.asc",
@@ -260,8 +238,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* pass phrase). All keys will be imported per one transaction using [TestConstants.DEFAULT_STRONG_PASSWORD].
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseThreeKeysSixthCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
@@ -280,8 +256,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* pass phrase). First will be used one key of the identical keys with a unique passphrase, and then the other keys.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseThreeKeysSeventhCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyB_default.asc",
@@ -303,8 +277,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* two keys with the same pass phrase.
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseFourKeysFirstCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
@@ -325,8 +297,6 @@ class CheckKeysActivityTestMultiBackups : BaseTest() {
* keys per one pass phrase typing).
*/
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseFourKeysSecondCombination() {
val keysPaths = arrayOf(
"pgp/key_testing@denbond7.com_keyA_strong.asc",
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityWithExistingKeysTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityWithExistingKeysTest.kt
index 683739dad5..e3aa4a7ed8 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityWithExistingKeysTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityWithExistingKeysTest.kt
@@ -16,9 +16,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.model.KeyDetails
@@ -73,8 +71,6 @@ class CheckKeysActivityWithExistingKeysTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowMsgEmptyPassPhrase() {
Espresso.closeSoftKeyboard()
onView(withId(R.id.buttonPositiveAction))
@@ -83,8 +79,6 @@ class CheckKeysActivityWithExistingKeysTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseIncorrectPassPhrase() {
onView(withId(R.id.editTextKeyPassword))
.perform(scrollTo(), typeText("some pass phrase"), closeSoftKeyboard())
@@ -94,8 +88,6 @@ class CheckKeysActivityWithExistingKeysTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseCorrectPassPhrase() {
onView(withId(R.id.editTextKeyPassword))
.perform(scrollTo(), typeText(TestConstants.DEFAULT_PASSWORD), closeSoftKeyboard())
@@ -106,8 +98,6 @@ class CheckKeysActivityWithExistingKeysTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testCheckClickButtonNegative() {
Espresso.closeSoftKeyboard()
onView(withId(R.id.buttonNegativeAction))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityWithoutExistingKeysTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityWithoutExistingKeysTest.kt
index 126fde9c66..da9bcb6397 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityWithoutExistingKeysTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CheckKeysActivityWithoutExistingKeysTest.kt
@@ -16,9 +16,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.model.KeyDetails
import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -62,8 +60,6 @@ class CheckKeysActivityWithoutExistingKeysTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowMsgEmptyWarning() {
Espresso.closeSoftKeyboard()
onView(withId(R.id.buttonPositiveAction))
@@ -72,8 +68,6 @@ class CheckKeysActivityWithoutExistingKeysTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseIncorrectPassPhrase() {
onView(withId(R.id.editTextKeyPassword))
.perform(scrollTo(), typeText("some pass phrase"), closeSoftKeyboard())
@@ -83,8 +77,6 @@ class CheckKeysActivityWithoutExistingKeysTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseCorrectPassPhrase() {
onView(withId(R.id.editTextKeyPassword))
.perform(scrollTo(), typeText("android"), closeSoftKeyboard())
@@ -95,8 +87,6 @@ class CheckKeysActivityWithoutExistingKeysTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testCheckClickButtonNegative() {
Espresso.closeSoftKeyboard()
onView(withId(R.id.buttonNegativeAction))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ContactsSettingsActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ContactsSettingsActivityTest.kt
index 7ee05d4163..e6c715eb7b 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ContactsSettingsActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ContactsSettingsActivityTest.kt
@@ -16,12 +16,10 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.CICandidateAnnotation
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.database.FlowCryptRoomDatabase
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withEmptyRecyclerView
import com.flowcrypt.email.model.PgpContact
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
@@ -59,15 +57,11 @@ class ContactsSettingsActivityTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowHelpScreen() {
testHelpScreen()
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEmptyList() {
onView(withId(R.id.recyclerViewContacts))
.check(matches(withEmptyRecyclerView())).check(matches(not(isDisplayed())))
@@ -76,7 +70,7 @@ class ContactsSettingsActivityTest : BaseTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testDeleteContacts() {
addContactsToDatabase()
//todo-denbond7 improve this in the future. When we have a good solution for ROOM, coroutines and Espresso
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityReplyAllTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityReplyAllTest.kt
index 60f47d5734..cd3ef46280 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityReplyAllTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityReplyAllTest.kt
@@ -11,9 +11,7 @@ import androidx.test.espresso.assertion.ViewAssertions
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.database.entity.AccountAliasesEntity
import com.flowcrypt.email.model.MessageEncryptionType
@@ -64,8 +62,6 @@ class CreateMessageActivityReplyAllTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testReplyAllUsingGmailAlias() {
val msgInfo = getMsgInfo("messages/info/standard_msg_reply_all_via_gmail_alias.json",
"messages/mime/standard_msg_reply_to_header.txt")
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityReplyTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityReplyTest.kt
index 71144911cc..1c24987015 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityReplyTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityReplyTest.kt
@@ -13,9 +13,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.model.MessageEncryptionType
import com.flowcrypt.email.model.MessageType
@@ -55,8 +53,6 @@ class CreateMessageActivityReplyTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testReplyToHeader() {
val msgInfo = getMsgInfo("messages/info/standard_msg_reply_to_header.json",
"messages/mime/standard_msg_reply_to_header.txt")
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityTest.kt
index a92d76aeb1..a0b5e03b9e 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateMessageActivityTest.kt
@@ -34,9 +34,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.api.email.EmailUtil
import com.flowcrypt.email.api.email.model.AttachmentInfo
@@ -121,8 +119,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEmptyRecipient() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -136,8 +132,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEmptyEmailSubject() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -157,8 +151,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEmptyEmailMsg() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -181,8 +173,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUsingStandardMsgEncryptionType() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -198,8 +188,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUsingSecureMsgEncryptionType() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -214,8 +202,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSwitchBetweenEncryptionTypes() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -240,15 +226,11 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowHelpScreen() {
activeActivityRule.launch(intent)
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testIsScreenOfComposeNewMsg() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -268,8 +250,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testWrongFormatOfRecipientEmailAddress() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -293,8 +273,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testAddingAtts() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -310,8 +288,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testDeletingAtts() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -337,8 +313,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSelectImportPublicKeyFromPopUp() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -356,8 +330,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSelectedStandardEncryptionTypeFromPopUp() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -373,8 +345,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSelectedRemoveRecipientFromPopUp() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -401,8 +371,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSelectedCopyFromOtherContactFromPopUp() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -422,8 +390,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSharePubKeySingle() {
activeActivityRule.launch(intent)
registerAllIdlingResources()
@@ -440,8 +406,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSharePubKeyMultiply() {
val secondKeyDetails =
PrivateKeysManager.getNodeKeyDetailsFromAssets(TestConstants.DEFAULT_SECOND_KEY_PRV_STRONG)
@@ -470,8 +434,6 @@ class CreateMessageActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSharePubKeyNoOwnKeys() {
PrivateKeysManager.deleteKey(addAccountToDatabaseRule.account,
addPrivateKeyToDatabaseRule.keyPath)
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateOrImportKeyActivityWithKeysTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateOrImportKeyActivityWithKeysTest.kt
index b66a8206bc..0d9a075638 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateOrImportKeyActivityWithKeysTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreateOrImportKeyActivityWithKeysTest.kt
@@ -18,9 +18,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.RetryRule
import com.flowcrypt.email.rules.ScreenshotTestRule
@@ -42,7 +40,6 @@ import org.junit.runner.RunWith
*/
@MediumTest
@RunWith(AndroidJUnit4::class)
-@DoesNotNeedMailserver
class CreateOrImportKeyActivityWithKeysTest : BaseCreateOrImportKeyActivityTest() {
override val useIntents: Boolean = true
override val activityScenarioRule = activityScenarioRule(CreateOrImportKeyActivity.newIntent(getTargetContext(), AccountDaoManager.getDefaultAccountDao(), true))
@@ -55,7 +52,6 @@ class CreateOrImportKeyActivityWithKeysTest : BaseCreateOrImportKeyActivityTest(
.around(ScreenshotTestRule())
@Test
- @ReadyForCIAnnotation
fun testClickOnButtonCreateNewKey() {
intending(allOf(hasComponent(ComponentName(getTargetContext(), CreatePrivateKeyActivity::class.java))))
.respondWith(Instrumentation.ActivityResult(Activity.RESULT_OK, null))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreatePrivateKeyActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreatePrivateKeyActivityTest.kt
index f6750d1db0..629ab59811 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreatePrivateKeyActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/CreatePrivateKeyActivityTest.kt
@@ -16,7 +16,7 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
+import com.flowcrypt.email.junit.annotations.DependsOnMailServer
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.RetryRule
import com.flowcrypt.email.rules.ScreenshotTestRule
@@ -52,7 +52,7 @@ class CreatePrivateKeyActivityTest : BasePassphraseActivityTest() {
.around(ScreenshotTestRule())
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testUseCorrectPassPhrase() {
onView(withId(R.id.editTextKeyPassword))
.check(matches(isDisplayed()))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/EmailManagerActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/EmailManagerActivityTest.kt
index 315723ac10..0fa9233296 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/EmailManagerActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/EmailManagerActivityTest.kt
@@ -24,11 +24,11 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.CICandidateAnnotation
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.api.email.model.LocalFolder
import com.flowcrypt.email.database.FlowCryptRoomDatabase
+import com.flowcrypt.email.junit.annotations.DependsOnMailServer
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withEmptyRecyclerView
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withToolBarText
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
@@ -76,7 +76,7 @@ class EmailManagerActivityTest : BaseEmailListActivityTest() {
.around(ScreenshotTestRule())
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testComposeFloatButton() {
onView(withId(R.id.floatActionButtonCompose))
.check(matches(isDisplayed()))
@@ -87,7 +87,7 @@ class EmailManagerActivityTest : BaseEmailListActivityTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testRunMsgDetailsActivity() {
//need to add some timeout while database will be updated
Thread.sleep(1000)
@@ -95,7 +95,7 @@ class EmailManagerActivityTest : BaseEmailListActivityTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testForceLoadMsgs() {
//need to add some timeout while database will be updated
Thread.sleep(1000)
@@ -111,7 +111,7 @@ class EmailManagerActivityTest : BaseEmailListActivityTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testOpenAndSwipeNavigationView() {
onView(withId(R.id.drawer_layout))
.perform(open())
@@ -120,6 +120,7 @@ class EmailManagerActivityTest : BaseEmailListActivityTest() {
}
@Test
+ @NotReadyForCI
fun testShowSplashActivityAfterLogout() {
val roomDatabase = FlowCryptRoomDatabase.getDatabase(getTargetContext())
val nonActiveAccounts = roomDatabase.accountDao().getAllNonactiveAccounts()
@@ -129,7 +130,7 @@ class EmailManagerActivityTest : BaseEmailListActivityTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testGoToSettingsActivity() {
onView(withId(R.id.drawer_layout))
.perform(open())
@@ -142,7 +143,7 @@ class EmailManagerActivityTest : BaseEmailListActivityTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testSwitchLabels() {
val menuItem = "Sent"
onView(withId(R.id.toolbar)).check(matches(anyOf(
@@ -159,7 +160,7 @@ class EmailManagerActivityTest : BaseEmailListActivityTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testShowAnotherAccounts() {
onView(withId(R.id.drawer_layout))
.perform(open())
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/HtmlViewFromAssetsRawActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/HtmlViewFromAssetsRawActivityTest.kt
index a7afad3666..0598f35bd2 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/HtmlViewFromAssetsRawActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/HtmlViewFromAssetsRawActivityTest.kt
@@ -16,9 +16,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.RetryRule
@@ -39,7 +37,6 @@ import org.junit.runner.RunWith
*/
@MediumTest
@RunWith(AndroidJUnit4::class)
-@DoesNotNeedMailserver
class HtmlViewFromAssetsRawActivityTest : BaseTest() {
override val activeActivityRule = lazyActivityScenarioRule(launchActivity = false)
override val activityScenario: ActivityScenario<*>?
@@ -53,7 +50,6 @@ class HtmlViewFromAssetsRawActivityTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @ReadyForCIAnnotation
fun testShowPrivacyTitle() {
startActivity(InstrumentationRegistry.getInstrumentation().targetContext.getString(R.string.privacy))
onView(allOf(withText(R.string.privacy), withParent(withId(R.id.toolbar))))
@@ -61,7 +57,6 @@ class HtmlViewFromAssetsRawActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testShowTermsTitle() {
startActivity(InstrumentationRegistry.getInstrumentation().targetContext.getString(R.string.terms))
onView(allOf(withText(R.string.terms), withParent(withId(R.id.toolbar))))
@@ -69,7 +64,6 @@ class HtmlViewFromAssetsRawActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testShowSecurityTitle() {
startActivity(InstrumentationRegistry.getInstrumentation().targetContext.getString(R.string.security))
onView(allOf(withText(R.string.security), withParent(withId(R.id.toolbar))))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPrivateKeyActivityFromSettingsTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPrivateKeyActivityFromSettingsTest.kt
index caa798aa47..94a851baec 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPrivateKeyActivityFromSettingsTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPrivateKeyActivityFromSettingsTest.kt
@@ -24,10 +24,11 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.api.retrofit.response.model.node.NodeKeyDetails
import com.flowcrypt.email.base.BaseTest
+import com.flowcrypt.email.junit.annotations.DependsOnMailServer
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.RetryRule
@@ -79,6 +80,7 @@ class ImportPrivateKeyActivityFromSettingsTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
+ @NotReadyForCI
fun testImportKeyFromBackup() {
useIntentionFromRunCheckKeysActivity()
@@ -89,7 +91,7 @@ class ImportPrivateKeyActivityFromSettingsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testImportKeyFromFile() {
useIntentionToRunActivityToSelectFile(fileWithPrivateKey)
useIntentionFromRunCheckKeysActivity()
@@ -101,7 +103,7 @@ class ImportPrivateKeyActivityFromSettingsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testShowErrorWhenImportingKeyFromFile() {
useIntentionToRunActivityToSelectFile(fileWithoutPrivateKey)
@@ -112,7 +114,7 @@ class ImportPrivateKeyActivityFromSettingsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testImportKeyFromClipboard() {
useIntentionFromRunCheckKeysActivity()
@@ -124,7 +126,7 @@ class ImportPrivateKeyActivityFromSettingsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
+ @DependsOnMailServer
fun testShowErrorWhenImportKeyFromClipboard() {
addTextToClipboard("not private key", SOME_TEXT)
onView(withId(R.id.buttonLoadFromClipboard))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPrivateKeyActivityNoPubOrgRulesTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPrivateKeyActivityNoPubOrgRulesTest.kt
index c653f09368..6ee7a8b6ba 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPrivateKeyActivityNoPubOrgRulesTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPrivateKeyActivityNoPubOrgRulesTest.kt
@@ -19,9 +19,7 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.api.retrofit.ApiHelper
import com.flowcrypt.email.api.retrofit.request.model.InitialLegacySubmitModel
@@ -77,8 +75,6 @@ class ImportPrivateKeyActivityNoPubOrgRulesTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testErrorWhenImportingKeyFromFile() {
useIntentionFromRunCheckKeysActivity()
addTextToClipboard("private key", privateKey)
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPublicKeyActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPublicKeyActivityTest.kt
index 3e69fa30e0..523984445e 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPublicKeyActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ImportPublicKeyActivityTest.kt
@@ -22,9 +22,7 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.model.PgpContact
@@ -75,8 +73,6 @@ class ImportPublicKeyActivityTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testImportKeyFromFile() {
val resultData = TestGeneralUtil.genIntentWithPersistedReadPermissionForFile(fileWithPublicKey)
intending(allOf(hasAction(Intent.ACTION_CHOOSER), hasExtra(`is`(Intent.EXTRA_INTENT), allOf(hasAction(Intent
@@ -89,8 +85,6 @@ class ImportPublicKeyActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowErrorWhenImportingKeyFromFile() {
val resultData = TestGeneralUtil.genIntentWithPersistedReadPermissionForFile(fileWithoutPublicKey)
intending(allOf(hasAction(Intent.ACTION_CHOOSER), hasExtra(`is`(Intent.EXTRA_INTENT), allOf(hasAction(Intent
@@ -103,8 +97,6 @@ class ImportPublicKeyActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testImportKeyFromClipboard() {
addTextToClipboard("public key", publicKey)
onView(withId(R.id.buttonLoadFromClipboard))
@@ -114,8 +106,6 @@ class ImportPublicKeyActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowErrorWhenImportKeyFromClipboard() {
addTextToClipboard("not public key", SOME_TEXT)
onView(withId(R.id.buttonLoadFromClipboard))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/KeysSettingsActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/KeysSettingsActivityTest.kt
index bfc43ce37a..6cfe2c7731 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/KeysSettingsActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/KeysSettingsActivityTest.kt
@@ -31,13 +31,11 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
-import com.flowcrypt.email.CICandidateAnnotation
import com.flowcrypt.email.Constants
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.base.BaseTest
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withEmptyRecyclerView
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withRecyclerViewItemCount
import com.flowcrypt.email.model.KeyDetails
@@ -96,8 +94,6 @@ class KeysSettingsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testAddNewKeys() {
intending(hasComponent(ComponentName(getTargetContext(), ImportPrivateKeyActivity::class.java)))
.respondWith(Instrumentation.ActivityResult(Activity.RESULT_OK, null))
@@ -119,8 +115,6 @@ class KeysSettingsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testKeyExists() {
onView(withId(R.id.recyclerViewKeys))
.check(matches(not(withEmptyRecyclerView()))).check(matches(isDisplayed()))
@@ -129,15 +123,11 @@ class KeysSettingsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowKeyDetailsScreen() {
selectFirstKey()
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testKeyDetailsShowPubKey() {
selectFirstKey()
val keyDetails = addPrivateKeyToDatabaseRule.nodeKeyDetails
@@ -148,8 +138,6 @@ class KeysSettingsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testKeyDetailsCopyToClipBoard() {
selectFirstKey()
val details = addPrivateKeyToDatabaseRule.nodeKeyDetails
@@ -161,7 +149,7 @@ class KeysSettingsActivityTest : BaseTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testKeyDetailsShowPrivateKey() {
selectFirstKey()
onView(withId(R.id.btnShowPrKey))
@@ -171,8 +159,6 @@ class KeysSettingsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testKeyDetailsCheckDetails() {
selectFirstKey()
val details = addPrivateKeyToDatabaseRule.nodeKeyDetails
@@ -200,8 +186,6 @@ class KeysSettingsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testKeyDetailsSavePubKeyToFileWhenFileIsNotExist() {
selectFirstKey()
val details = addPrivateKeyToDatabaseRule.nodeKeyDetails
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/LegalSettingsActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/LegalSettingsActivityTest.kt
index 9b4132dff9..3508b1d794 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/LegalSettingsActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/LegalSettingsActivityTest.kt
@@ -17,9 +17,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -41,7 +39,6 @@ import org.junit.runner.RunWith
*/
@MediumTest
@RunWith(AndroidJUnit4::class)
-@DoesNotNeedMailserver
class LegalSettingsActivityTest : BaseTest() {
override val activityScenarioRule = activityScenarioRule()
@@ -60,7 +57,6 @@ class LegalSettingsActivityTest : BaseTest() {
getResString(R.string.sources))
@Test
- @ReadyForCIAnnotation
fun testClickToTitleViewPager() {
for (titleName in titleNames) {
onView(allOf(withParent(withParent(withParent(withId(R.id.tabLayout)))), withText(titleName)))
@@ -72,13 +68,11 @@ class LegalSettingsActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testShowHelpScreen() {
testHelpScreen()
}
@Test
- @ReadyForCIAnnotation
fun testSwipeInViewPager() {
onView(allOf(withParent(withParent(withParent(withId(R.id.tabLayout)))), withText(titleNames[0])))
.check(matches(isDisplayed())).check(matches(isSelected()))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityTest.kt
index 286aa6f8c9..7c7d051a36 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityTest.kt
@@ -34,10 +34,7 @@ import androidx.test.espresso.web.webdriver.DriverAtoms.getText
import androidx.test.espresso.web.webdriver.Locator
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.CICandidateAnnotation
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.api.email.EmailUtil
import com.flowcrypt.email.api.email.model.AttachmentInfo
@@ -47,6 +44,7 @@ import com.flowcrypt.email.api.retrofit.response.model.node.DecryptErrorMsgBlock
import com.flowcrypt.email.api.retrofit.response.model.node.PublicKeyMsgBlock
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.database.entity.MessageEntity
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.matchers.CustomMatchers
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withDrawable
import com.flowcrypt.email.model.KeyDetails
@@ -115,8 +113,6 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testReplyButton() {
testStandardMsgPlaneText()
onView(withId(R.id.layoutReplyButton))
@@ -126,15 +122,11 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testTopReplyButton() {
testTopReplyAction(getResString(R.string.reply))
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testReplyAllButton() {
testStandardMsgPlaneText()
onView(withId(R.id.layoutReplyAllButton))
@@ -144,8 +136,6 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testFwdButton() {
testStandardMsgPlaneText()
onView(withId(R.id.layoutFwdButton))
@@ -155,38 +145,30 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testTopForwardButton() {
testTopReplyAction(getResString(R.string.forward))
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testStandardMsgPlaneText() {
baseCheck(getMsgInfo("messages/info/standard_msg_info_plain_text.json",
"messages/mime/standard_msg_info_plain_text.txt"))
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testStandardMsgPlaneTextWithOneAttachment() {
baseCheckWithAtt(getMsgInfo("messages/info/standard_msg_info_plain_text_with_one_att.json",
"messages/mime/standard_msg_info_plain_text_with_one_att.txt", simpleAttInfo), simpleAttInfo)
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEncryptedMsgPlaneText() {
baseCheck(getMsgInfo("messages/info/encrypted_msg_info_plain_text.json",
"messages/mime/encrypted_msg_info_plain_text.txt"))
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
//don't enable this one on CI. It takes too long
fun testEncryptedBigInlineAtt() {
IdlingPolicies.setIdlingResourceTimeout(3, TimeUnit.MINUTES)
@@ -195,8 +177,6 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testMissingKeyErrorImportKey() {
testMissingKey(getMsgInfo("messages/info/encrypted_msg_info_plain_text_with_missing_key.json",
"messages/mime/encrypted_msg_info_plain_text_with_missing_key.txt"))
@@ -228,16 +208,12 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testMissingPubKey() {
testMissingKey(getMsgInfo("messages/info/encrypted_msg_info_plain_text_error_one_pub_key.json",
"messages/mime/encrypted_msg_info_plain_text_error_one_pub_key.txt"))
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testBadlyFormattedMsg() {
val msgInfo = getMsgInfo("messages/info/encrypted_msg_info_plain_text_error_badly_formatted.json",
"messages/mime/encrypted_msg_info_plain_text_error_badly_formatted.txt")
@@ -263,8 +239,6 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testMissingKeyErrorChooseSinglePubKey() {
val msgInfo = getMsgInfo("messages/info/encrypted_msg_info_plain_text_with_missing_key.json",
"messages/mime/encrypted_msg_info_plain_text_with_missing_key.txt")
@@ -284,8 +258,6 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testMissingKeyErrorChooseFromFewPubKeys() {
val msgInfo = getMsgInfo("messages/info/encrypted_msg_info_plain_text_with_missing_key.json",
"messages/mime/encrypted_msg_info_plain_text_with_missing_key.txt")
@@ -317,8 +289,6 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEncryptedMsgPlaneTextWithOneAttachment() {
val msgInfo = getMsgInfo("messages/info/encrypted_msg_info_plain_text_with_one_att.json",
"messages/mime/encrypted_msg_info_plain_text_with_one_att.txt", encryptedAttInfo)
@@ -326,8 +296,6 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEncryptedMsgPlaneTextWithPubKey() {
val msgInfo = getMsgInfo("messages/info/encrypted_msg_info_plain_text_with_pub_key.json",
"messages/mime/encrypted_msg_info_plain_text_with_pub_key.txt", pubKeyAttInfo)
@@ -368,8 +336,6 @@ class MessageDetailsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun test8bitEncodingUtf8() {
baseCheck(getMsgInfo("messages/info/msg_info_8bit-utf8.json",
"messages/mime/8bit-utf8.txt"))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/PreviewImportPgpContactActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/PreviewImportPgpContactActivityTest.kt
index 39a1aa3180..a9059c6e0f 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/PreviewImportPgpContactActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/PreviewImportPgpContactActivityTest.kt
@@ -15,9 +15,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.assertions.RecyclerViewItemCountAssertion
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.database.FlowCryptRoomDatabase
@@ -44,7 +42,6 @@ import org.junit.runner.RunWith
*/
@MediumTest
@RunWith(AndroidJUnit4::class)
-@DoesNotNeedMailserver
class PreviewImportPgpContactActivityTest : BaseTest() {
override val activeActivityRule = lazyActivityScenarioRule(launchActivity = false)
override val activityScenario: ActivityScenario<*>?
@@ -65,7 +62,6 @@ class PreviewImportPgpContactActivityTest : BaseTest() {
TestGeneralUtil.readFileFromAssetsAsString(getContext(), "pgp/pub_keys_2048_bits_10.asc")
@Test
- @ReadyForCIAnnotation
fun testShowHelpScreen() {
activeActivityRule.launch(PreviewImportPgpContactActivity.newIntent(getTargetContext(), singlePublicKeyForUnsavedContact))
registerAllIdlingResources()
@@ -73,7 +69,6 @@ class PreviewImportPgpContactActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testIsDisplayedSingleItem() {
val pgpContact = PgpContact("default@denbond7.com", null,
singlePublicKeyForUnsavedContact, true, null, null, null, 0)
@@ -88,7 +83,6 @@ class PreviewImportPgpContactActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testIsDisplayedLabelAlreadyImported() {
activeActivityRule.launch(
PreviewImportPgpContactActivity.newIntent(getTargetContext(), singlePublicKeyForUnsavedContact))
@@ -98,7 +92,6 @@ class PreviewImportPgpContactActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSaveButtonForSingleContact() {
activeActivityRule.launch(
PreviewImportPgpContactActivity.newIntent(getTargetContext(), singlePublicKeyForUnsavedContact))
@@ -112,7 +105,6 @@ class PreviewImportPgpContactActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testIsImportAllButtonDisplayed() {
activeActivityRule.launch(PreviewImportPgpContactActivity.newIntent(getTargetContext(), tenPubKeys))
registerAllIdlingResources()
@@ -121,7 +113,6 @@ class PreviewImportPgpContactActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testLoadLotOfContacts() {
val countOfKeys = 10
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/PublicKeyDetailsFragmentTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/PublicKeyDetailsFragmentTest.kt
index 67793f33a8..26c9d1ef2b 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/PublicKeyDetailsFragmentTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/PublicKeyDetailsFragmentTest.kt
@@ -30,9 +30,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
import com.flowcrypt.email.Constants
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.database.FlowCryptRoomDatabase
import com.flowcrypt.email.model.PgpContact
@@ -92,8 +90,6 @@ class PublicKeyDetailsFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testPubKeyDetails() {
chooseContact()
@@ -116,8 +112,6 @@ class PublicKeyDetailsFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testActionCopy() {
chooseContact()
@@ -131,8 +125,6 @@ class PublicKeyDetailsFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testActionSave() {
chooseContact()
@@ -162,8 +154,6 @@ class PublicKeyDetailsFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testActionDelete() {
chooseContact()
@@ -177,8 +167,6 @@ class PublicKeyDetailsFragmentTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testActionHelp() {
testHelpScreen()
}
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SearchBackupsInEmailActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SearchBackupsInEmailActivityTest.kt
index 5548b84267..bd148c1559 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SearchBackupsInEmailActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SearchBackupsInEmailActivityTest.kt
@@ -16,9 +16,9 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.CICandidateAnnotation
import com.flowcrypt.email.R
import com.flowcrypt.email.base.BaseTest
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
import com.flowcrypt.email.rules.AddPrivateKeyToDatabaseRule
import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -53,13 +53,13 @@ class SearchBackupsInEmailActivityTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testShowHelpScreen() {
testHelpScreen()
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testIsBackupFound() {
onView(withId(R.id.buttonSeeMoreBackupOptions))
.check(matches(isDisplayed()))
@@ -68,7 +68,7 @@ class SearchBackupsInEmailActivityTest : BaseTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testShowBackupOptions() {
testIsBackupFound()
onView(withId(R.id.buttonSeeMoreBackupOptions))
@@ -78,7 +78,7 @@ class SearchBackupsInEmailActivityTest : BaseTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testSelectEmailForSavingBackup() {
testShowBackupOptions()
onView(withId(R.id.radioButtonEmail))
@@ -93,7 +93,7 @@ class SearchBackupsInEmailActivityTest : BaseTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testSelectDownloadToFileForSavingBackup() {
testShowBackupOptions()
onView(withId(R.id.radioButtonDownload))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SearchMessagesActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SearchMessagesActivityTest.kt
index bf5c899b60..e2855ace66 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SearchMessagesActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SearchMessagesActivityTest.kt
@@ -23,9 +23,9 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.CICandidateAnnotation
import com.flowcrypt.email.R
import com.flowcrypt.email.api.email.model.LocalFolder
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withEmptyRecyclerView
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withRecyclerViewItemCount
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
@@ -77,7 +77,7 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testDefaultSearchQueryAtStart() {
onView(allOf(withId(R.id.menuSearch), withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
.check(matches(isDisplayed()))
@@ -88,7 +88,7 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testSearchQuery() {
onView(withId(R.id.rVMsgs))
.check(matches(withRecyclerViewItemCount(1))).check(matches(isDisplayed()))
@@ -105,7 +105,7 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testSearchOverSubjectBodyFrom() {
onView(allOf(withId(R.id.menuSearch), withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
.check(matches(isDisplayed()))
@@ -119,7 +119,7 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testShowNotEmptyList() {
onView(withId(R.id.rVMsgs))
.check(matches(isDisplayed()))
@@ -128,14 +128,14 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testOpenSomeMsg() {
testShowNotEmptyList()
testRunMsgDetailsActivity(0)
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testCheckNoResults() {
onView(allOf(withId(R.id.menuSearch), withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
.check(matches(isDisplayed()))
@@ -152,7 +152,7 @@ class SearchMessagesActivityTest : BaseEmailListActivityTest() {
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testClearSearchView() {
onView(allOf(withId(R.id.menuSearch), withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
.check(matches(isDisplayed()))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SelectContactsActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SelectContactsActivityTest.kt
index d6ee3b99c9..e223e1091b 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SelectContactsActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SelectContactsActivityTest.kt
@@ -22,9 +22,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.database.FlowCryptRoomDatabase
@@ -90,8 +88,6 @@ class SelectContactsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowEmptyView() {
clearContactsFromDatabase()
@@ -103,8 +99,6 @@ class SelectContactsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowListContacts() {
onView(withId(R.id.emptyView))
.check(matches(not(isDisplayed())))
@@ -121,8 +115,6 @@ class SelectContactsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testCheckSearchExistingContact() {
onView(withId(R.id.menuSearch))
.check(matches(isDisplayed()))
@@ -138,8 +130,6 @@ class SelectContactsActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testNoResults() {
onView(withId(R.id.menuSearch))
.check(matches(isDisplayed()))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SettingsActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SettingsActivityTest.kt
index 914803edaf..b7eee22dcb 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SettingsActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SettingsActivityTest.kt
@@ -16,11 +16,9 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.CICandidateAnnotation
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.RetryRule
@@ -54,50 +52,38 @@ class SettingsActivityTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowHelpScreen() {
testHelpScreen()
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
@Ignore("need to change this test")
fun testShowBackupsScreen() {
checkIsScreenDisplaying(getResString(R.string.backups))
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowSecurityScreen() {
checkIsScreenDisplaying(getResString(R.string.security_and_privacy))
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowContactsScreen() {
checkIsScreenDisplaying(getResString(R.string.contacts))
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowKeysScreen() {
checkIsScreenDisplaying(getResString(R.string.keys))
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowAttesterScreen() {
checkIsScreenDisplaying(getResString(R.string.attester))
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowLegalScreen() {
checkIsScreenDisplaying(getResString(R.string.experimental), getResString(R.string.experimental_settings))
}
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ShareIntentsTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ShareIntentsTest.kt
index d1b940da7d..41ed11cc62 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ShareIntentsTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/ShareIntentsTest.kt
@@ -20,9 +20,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.flowcrypt.email.Constants
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
@@ -60,7 +58,6 @@ import java.util.*
*/
@MediumTest
@RunWith(AndroidJUnit4::class)
-@DoesNotNeedMailserver
class ShareIntentsTest : BaseTest() {
override val activeActivityRule = lazyActivityScenarioRule(launchActivity = false)
override val activityScenario: ActivityScenario<*>?
@@ -78,7 +75,6 @@ class ShareIntentsTest : BaseTest() {
get() = if (Random().nextBoolean()) Intent.ACTION_SENDTO else Intent.ACTION_VIEW
@Test
- @ReadyForCIAnnotation
fun testEmptyUri() {
activeActivityRule.launch(genIntentForUri(randomActionForRFC6068, null))
registerAllIdlingResources()
@@ -86,7 +82,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testToSubjectBody() {
activeActivityRule.launch(genIntentForUri(randomActionForRFC6068, "mailto:" + recipients[0]
+ "?subject=" + ENCODED_SUBJECT + "&body=" + ENCODED_BODY))
@@ -95,7 +90,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testToParamSubjectBody() {
activeActivityRule.launch(genIntentForUri(randomActionForRFC6068, "mailto:?to=" + recipients[0]
+ "&subject=" + ENCODED_SUBJECT + "&body=" + ENCODED_BODY))
@@ -104,7 +98,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testToToParamSubjectBody() {
activeActivityRule.launch(genIntentForUri(randomActionForRFC6068, "mailto:" + recipients[0]
+ "?to=" + recipients[1] + "&subject=" + ENCODED_SUBJECT + "&body=" + ENCODED_BODY))
@@ -113,7 +106,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testToParamToSubjectBody() {
activeActivityRule.launch(genIntentForUri(randomActionForRFC6068, "mailto:?to=" + recipients[0]
+ "," + recipients[1] + "&subject=" + ENCODED_SUBJECT + "&body=" + ENCODED_BODY))
@@ -122,7 +114,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testMultiToSubjectBody() {
activeActivityRule.launch(genIntentForUri(randomActionForRFC6068, "mailto:" + recipients[0]
+ "," + recipients[1] + "?subject=" + ENCODED_SUBJECT + "&body=" + ENCODED_BODY))
@@ -131,7 +122,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testMultiToParamSubjectBody() {
activeActivityRule.launch(genIntentForUri(randomActionForRFC6068, "mailto:?to=" + recipients[0]
+ "&to=" + recipients[1] + "&subject=" + ENCODED_SUBJECT + "&body=" + ENCODED_BODY))
@@ -140,7 +130,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testEmptyMailToSchema() {
activeActivityRule.launch(genIntentForUri(randomActionForRFC6068, "mailto:"))
registerAllIdlingResources()
@@ -148,7 +137,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendEmptyExtras() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND, null, null, 0))
registerAllIdlingResources()
@@ -156,7 +144,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendExtSubject() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND, Intent.EXTRA_SUBJECT, null, 0))
registerAllIdlingResources()
@@ -164,7 +151,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendExtBody() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND, null, Intent.EXTRA_TEXT, 0))
registerAllIdlingResources()
@@ -172,7 +158,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendAtt() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND, null, null, 1))
registerAllIdlingResources()
@@ -180,7 +165,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendExtSubjectExtBody() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND, Intent.EXTRA_SUBJECT,
Intent.EXTRA_TEXT, 0))
@@ -189,7 +173,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendExtSubjectAtt() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND, Intent.EXTRA_SUBJECT, null, 1))
registerAllIdlingResources()
@@ -197,7 +180,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendExtBodyAtt() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND, null, Intent.EXTRA_TEXT, 1))
registerAllIdlingResources()
@@ -205,7 +187,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendExtSubjectExtBodyAtt() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND, Intent.EXTRA_SUBJECT,
Intent.EXTRA_TEXT, 1))
@@ -214,7 +195,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendMultipleMultiAtt() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND_MULTIPLE, null, null, atts.size))
registerAllIdlingResources()
@@ -222,7 +202,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testSendMultipleExtSubjectExtBodyMultiAtt() {
activeActivityRule.launch(generateIntentWithExtras(Intent.ACTION_SEND_MULTIPLE, Intent.EXTRA_SUBJECT,
Intent.EXTRA_TEXT, atts.size))
@@ -231,7 +210,6 @@ class ShareIntentsTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testDoNotSupportAttWithFileSchema() {
activeActivityRule.launch(
generateIntentWithExtras(Intent.ACTION_SEND, Intent.EXTRA_SUBJECT, Intent.EXTRA_TEXT, 0).apply {
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SignInActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SignInActivityTest.kt
index aa4520d232..32a31a1c44 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SignInActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/SignInActivityTest.kt
@@ -17,9 +17,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.RetryRule
@@ -53,8 +51,6 @@ class SignInActivityTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseOtherEmailProviders() {
onView(withId(R.id.buttonOtherEmailProvider))
.check(matches(isDisplayed()))
@@ -64,8 +60,6 @@ class SignInActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testUseGmail() {
onView(withId(R.id.buttonSignInWithGmail))
.check(matches(isDisplayed()))
@@ -75,8 +69,6 @@ class SignInActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowSecurityScreen() {
onView(withId(R.id.buttonSecurity))
.check(matches(isDisplayed()))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/StandardReplyWithServiceInfoAndOneFileTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/StandardReplyWithServiceInfoAndOneFileTest.kt
index 9cc06b95c9..68465a36e3 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/StandardReplyWithServiceInfoAndOneFileTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/StandardReplyWithServiceInfoAndOneFileTest.kt
@@ -20,9 +20,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.api.email.EmailUtil
import com.flowcrypt.email.api.email.JavaEmailConstants
import com.flowcrypt.email.api.email.model.AttachmentInfo
@@ -96,8 +94,6 @@ class StandardReplyWithServiceInfoAndOneFileTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testFrom() {
onView(withId(R.id.editTextFrom))
.perform(scrollTo())
@@ -106,14 +102,12 @@ class StandardReplyWithServiceInfoAndOneFileTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testToRecipients() {
val chipSeparator = SpanChipTokenizer.CHIP_SPAN_SEPARATOR.toString()
val autoCorrectSeparator = SpanChipTokenizer.AUTOCORRECT_SEPARATOR.toString()
val textWithSeparator = (autoCorrectSeparator
+ chipSeparator
- + incomingMsgInfo.getFrom()?.first()?.address
+ + incomingMsgInfo.getFrom().first().address
+ chipSeparator
+ autoCorrectSeparator)
@@ -124,8 +118,6 @@ class StandardReplyWithServiceInfoAndOneFileTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testSubject() {
onView(withId(R.id.editTextEmailSubject))
.perform(scrollTo())
@@ -134,8 +126,6 @@ class StandardReplyWithServiceInfoAndOneFileTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEmailMsg() {
onView(withId(R.id.editTextEmailMessage))
.perform(scrollTo())
@@ -151,8 +141,6 @@ class StandardReplyWithServiceInfoAndOneFileTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testAvailabilityAddingAtts() {
if (!serviceInfo.hasAbilityToAddNewAtt) {
onView(withId(R.id.menuActionAttachFile))
@@ -161,8 +149,6 @@ class StandardReplyWithServiceInfoAndOneFileTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testDisabledSwitchingBetweenEncryptionTypes() {
if (!serviceInfo.isMsgTypeSwitchable) {
onView(withText(R.string.switch_to_standard_email))
@@ -173,8 +159,6 @@ class StandardReplyWithServiceInfoAndOneFileTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowHelpScreen() {
testHelpScreen()
}
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/base/BaseCreateOrImportKeyActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/base/BaseCreateOrImportKeyActivityTest.kt
index c318611a9d..9e34abf096 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/base/BaseCreateOrImportKeyActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/base/BaseCreateOrImportKeyActivityTest.kt
@@ -18,7 +18,6 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.ui.activity.CreateOrImportKeyActivity
import com.flowcrypt.email.ui.activity.ImportPrivateKeyActivity
@@ -38,7 +37,6 @@ import org.junit.runner.RunWith
abstract class BaseCreateOrImportKeyActivityTest : BaseTest() {
@Test
- @ReadyForCIAnnotation
fun testClickOnButtonImportMyKey() {
intending(allOf(hasComponent(ComponentName(getTargetContext(), ImportPrivateKeyActivity::class.java)),
hasExtraWithKey(BaseImportKeyActivity.KEY_EXTRA_IS_SYNC_ENABLE),
@@ -53,7 +51,6 @@ abstract class BaseCreateOrImportKeyActivityTest : BaseTest() {
}
@Test
- @ReadyForCIAnnotation
fun testClickOnButtonSelectAnotherAccount() {
onView(withId(R.id.buttonSelectAnotherAccount))
.perform(scrollTo(), click())
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/base/BasePassphraseActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/base/BasePassphraseActivityTest.kt
index c2ba6332f1..f464b84ded 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/base/BasePassphraseActivityTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/base/BasePassphraseActivityTest.kt
@@ -15,9 +15,7 @@ import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import org.hamcrest.Matchers.isEmptyString
import org.hamcrest.Matchers.startsWith
@@ -32,8 +30,6 @@ import java.util.*
*/
abstract class BasePassphraseActivityTest : BaseTest() {
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowDialogWithPasswordRecommendation() {
onView(withId(R.id.imageButtonShowPasswordHint))
.check(matches(isDisplayed()))
@@ -47,8 +43,6 @@ abstract class BasePassphraseActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEmptyFirstPassPhrase() {
closeSoftKeyboard()
onView(withId(R.id.buttonSetPassPhrase))
@@ -59,8 +53,6 @@ abstract class BasePassphraseActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testEmptySecondPassPhrase() {
testShowRepeatingPassPhraseScreen()
onView(withId(R.id.buttonConfirmPassPhrases))
@@ -70,8 +62,6 @@ abstract class BasePassphraseActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowRepeatingPassPhraseScreen() {
onView(withId(R.id.editTextKeyPassword))
.perform(scrollTo(), replaceText(PERFECT_PASSWORD), closeSoftKeyboard())
@@ -83,8 +73,6 @@ abstract class BasePassphraseActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowMsgMismatchOfPassPhrase() {
testShowRepeatingPassPhraseScreen()
@@ -100,8 +88,6 @@ abstract class BasePassphraseActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testGoToUseAnotherPassPhrase() {
testShowRepeatingPassPhraseScreen()
@@ -113,8 +99,6 @@ abstract class BasePassphraseActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testCheckEraseOfRepeatingPassPhrase() {
testShowRepeatingPassPhraseScreen()
@@ -133,8 +117,6 @@ abstract class BasePassphraseActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testChangingQualityOfPassPhrase() {
val passPhrases = arrayOf(WEAK_PASSWORD, POOR_PASSWORD, REASONABLE_PASSWORD, GOOD_PASSWORD,
GREAT_PASSWORD, PERFECT_PASSWORD)
@@ -159,8 +141,6 @@ abstract class BasePassphraseActivityTest : BaseTest() {
}
@Test
- @DoesNotNeedMailserver
- @ReadyForCIAnnotation
fun testShowDialogAboutBadPassPhrase() {
val badPassPhrases = arrayOf(WEAK_PASSWORD, POOR_PASSWORD)
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/AddNewAccountActivityEnterpriseTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/AddNewAccountActivityEnterpriseTest.kt
index 500bab4004..b2b049e983 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/AddNewAccountActivityEnterpriseTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/AddNewAccountActivityEnterpriseTest.kt
@@ -15,7 +15,6 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.api.retrofit.ApiHelper
@@ -23,6 +22,7 @@ import com.flowcrypt.email.api.retrofit.request.model.LoginModel
import com.flowcrypt.email.api.retrofit.response.api.DomainRulesResponse
import com.flowcrypt.email.api.retrofit.response.api.LoginResponse
import com.flowcrypt.email.api.retrofit.response.model.DomainRules
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.FlowCryptMockWebServerRule
@@ -50,7 +50,6 @@ import java.io.InputStreamReader
* E-mail: DenBond7@gmail.com
*/
@MediumTest
-@DoesNotNeedMailserver
@RunWith(AndroidJUnit4::class)
class AddNewAccountActivityEnterpriseTest : BaseSignActivityTest() {
override val useIntents: Boolean = true
@@ -65,6 +64,7 @@ class AddNewAccountActivityEnterpriseTest : BaseSignActivityTest() {
.around(ScreenshotTestRule())
@Test
+ @NotReadyForCI
fun testNoPrvCreateRule() {
setupAndClickSignInButton(genMockGoogleSignInAccountJson(EMAIL_WITH_NO_PRV_CREATE_RULE))
intended(hasComponent(CreateOrImportKeyActivity::class.java.name))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/CreateOrImportKeyActivityEnterpriseTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/CreateOrImportKeyActivityEnterpriseTest.kt
index 9e49e054b2..1e5a088a4b 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/CreateOrImportKeyActivityEnterpriseTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/CreateOrImportKeyActivityEnterpriseTest.kt
@@ -12,9 +12,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.RetryRule
import com.flowcrypt.email.rules.ScreenshotTestRule
@@ -35,7 +33,6 @@ import org.junit.runner.RunWith
* E-mail: DenBond7@gmail.com
*/
@MediumTest
-@DoesNotNeedMailserver
@RunWith(AndroidJUnit4::class)
class CreateOrImportKeyActivityEnterpriseTest : BaseCreateOrImportKeyActivityTest() {
override val useIntents: Boolean = true
@@ -54,7 +51,6 @@ class CreateOrImportKeyActivityEnterpriseTest : BaseCreateOrImportKeyActivityTes
.around(ScreenshotTestRule())
@Test
- @ReadyForCIAnnotation
fun testCreateNewKeyNotExist() {
onView(withId(R.id.buttonCreateNewKey))
.check(matches(not(isDisplayed())))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/CreatePrivateKeyActivityEnterpriseTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/CreatePrivateKeyActivityEnterpriseTest.kt
index d6616c4d11..fd662c8ac9 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/CreatePrivateKeyActivityEnterpriseTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/CreatePrivateKeyActivityEnterpriseTest.kt
@@ -18,9 +18,7 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.api.retrofit.ApiHelper
import com.flowcrypt.email.api.retrofit.request.model.InitialLegacySubmitModel
@@ -52,7 +50,6 @@ import java.io.InputStreamReader
* E-mail: DenBond7@gmail.com
*/
@MediumTest
-@DoesNotNeedMailserver
@RunWith(AndroidJUnit4::class)
class CreatePrivateKeyActivityEnterpriseTest : BasePassphraseActivityTest() {
override val activityScenarioRule = activityScenarioRule(
@@ -70,7 +67,6 @@ class CreatePrivateKeyActivityEnterpriseTest : BasePassphraseActivityTest() {
.around(ScreenshotTestRule())
@Test
- @ReadyForCIAnnotation
fun testFailAttesterSubmit() {
onView(withId(R.id.editTextKeyPassword))
.check(matches(isDisplayed()))
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/SettingsActivityEnterpriseTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/SettingsActivityEnterpriseTest.kt
index 7954b5fbd7..0e11f64457 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/SettingsActivityEnterpriseTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/SettingsActivityEnterpriseTest.kt
@@ -11,9 +11,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.rules.AddAccountToDatabaseRule
import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -35,7 +33,6 @@ import org.junit.runner.RunWith
* E-mail: DenBond7@gmail.com
*/
@MediumTest
-@DoesNotNeedMailserver
@RunWith(AndroidJUnit4::class)
class SettingsActivityEnterpriseTest : BaseTest() {
override val activityScenarioRule = activityScenarioRule()
@@ -50,7 +47,6 @@ class SettingsActivityEnterpriseTest : BaseTest() {
.around(ScreenshotTestRule())
@Test
- @ReadyForCIAnnotation
fun testBackupsDisabled() {
//need to wait database updates
Thread.sleep(1000)
diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/SignInActivityEnterpriseTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/SignInActivityEnterpriseTest.kt
index 4d708af1c1..4b381035f3 100644
--- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/SignInActivityEnterpriseTest.kt
+++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/enterprise/SignInActivityEnterpriseTest.kt
@@ -15,10 +15,7 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
-import com.flowcrypt.email.CICandidateAnnotation
-import com.flowcrypt.email.DoesNotNeedMailserver
import com.flowcrypt.email.R
-import com.flowcrypt.email.ReadyForCIAnnotation
import com.flowcrypt.email.TestConstants
import com.flowcrypt.email.api.retrofit.ApiHelper
import com.flowcrypt.email.api.retrofit.request.model.LoginModel
@@ -26,6 +23,7 @@ import com.flowcrypt.email.api.retrofit.response.api.DomainRulesResponse
import com.flowcrypt.email.api.retrofit.response.api.LoginResponse
import com.flowcrypt.email.api.retrofit.response.base.ApiError
import com.flowcrypt.email.api.retrofit.response.model.DomainRules
+import com.flowcrypt.email.junit.annotations.NotReadyForCI
import com.flowcrypt.email.rules.ClearAppSettingsRule
import com.flowcrypt.email.rules.FlowCryptMockWebServerRule
import com.flowcrypt.email.rules.RetryRule
@@ -53,7 +51,6 @@ import java.io.InputStreamReader
* E-mail: DenBond7@gmail.com
*/
@MediumTest
-@DoesNotNeedMailserver
@RunWith(AndroidJUnit4::class)
class SignInActivityEnterpriseTest : BaseSignActivityTest() {
override val useIntents: Boolean = true
@@ -72,28 +69,25 @@ class SignInActivityEnterpriseTest : BaseSignActivityTest() {
.around(ScreenshotTestRule())
@Test
- @ReadyForCIAnnotation
fun testErrorLogin() {
setupAndClickSignInButton(genMockGoogleSignInAccountJson(EMAIL_LOGIN_ERROR))
isToastDisplayed(decorView, LOGIN_API_ERROR_RESPONSE.apiError?.msg!!)
}
@Test
- @ReadyForCIAnnotation
fun testSuccessLoginNotVerified() {
setupAndClickSignInButton(genMockGoogleSignInAccountJson(EMAIL_LOGIN_NOT_VERIFIED))
isToastDisplayed(decorView, getResString(R.string.user_not_verified))
}
@Test
- @ReadyForCIAnnotation
fun testErrorGetDomainRules() {
setupAndClickSignInButton(genMockGoogleSignInAccountJson(EMAIL_DOMAIN_RULES_ERROR))
isToastDisplayed(decorView, DOMAIN_RULES_ERROR_RESPONSE.apiError?.msg!!)
}
@Test
- @CICandidateAnnotation
+ @NotReadyForCI
fun testNoPrvCreateRule() {
setupAndClickSignInButton(genMockGoogleSignInAccountJson(EMAIL_WITH_NO_PRV_CREATE_RULE))
intended(hasComponent(CreateOrImportKeyActivity::class.java.name))
diff --git a/README.md b/README.md
index 4173fec9f9..5addbc18c6 100644
--- a/README.md
+++ b/README.md
@@ -14,25 +14,33 @@ Every scenario described in this section was tested on Ubuntu.
We have two types of tests which can be run:
- Independent tests which don't require any additional dependencies.
- Such tests are marked with the `@DoesNotNeedMailserver` annotation.
- Tests which depend on an email server.
+ Such tests are marked with the `@DependsOnMailServer` annotation.
-We run all tests on [Semaphore CI](https://semaphoreci.com/) for every commit.
-Please use following steps to run the indepenent tests locally:
+We run tests on [Semaphore CI](https://semaphoreci.com/) for every commit.
+To run tests which depend on an email server we use a custom [Docker image](https://hub.docker.com/r/flowcrypt/flowcrypt-email-server),
+which extends [docker-mailserver](https://github.com/tomav/docker-mailserver).
+This image has predefined settings for local testing. It has accounts and messages which we need for testing.
+You can investigate [`docker-mailserver`](https://github.com/FlowCrypt/flowcrypt-android/tree/master/docker-mailserver)
+folder to see more details. To be able to run tests which depend on an email server please install `docker-compose` with [these instructions](https://docs.docker.com/compose/install/).
+
+Please use following steps to run **the independent tests** locally:
- Setup your device (virtual or physical) via [these instructions](https://developer.android.com/training/testing/espresso/setup#set-up-environment).
- Run `../script/ci-instrumentation-tests-without-mailserver.sh 1 0` (where `1` is a `numShards` and `0` is a `shardIndex`).
You can find more details [here](https://developer.android.com/training/testing/junit-runner#sharding-tests).
- Sharding the tests help us run them on a few emulators at the same time.
+ Sharding the tests help us run them in pieces on a few emulators at the same time to reduce runtime.
-To run all tests we use a custom [Docker image](https://hub.docker.com/r/flowcrypt/flowcrypt-email-server),
-which extends [docker-mailserver](https://github.com/tomav/docker-mailserver).
-This image has predefined settings for local testing. It has accounts and messages which we need for testing.
-You can investigate [`docker-mailserver`](https://github.com/FlowCrypt/flowcrypt-android/tree/master/docker-mailserver)
-folder to see more details. Please follow these steps to run all tests locally:
+Please use following steps to run **tests that depend on an email** server locally:
+
+- Setup your device (virtual or physical) via [these instructions](https://developer.android.com/training/testing/espresso/setup#set-up-environment).
+- Run `./docker-mailserver/run_email_server.sh` and wait while the email server will be started.
+- Run `../script/ci-instrumentation-tests-with-mailserver.sh`
+- Run `./docker-mailserver/stop_email_server.sh` to stop the email server.
+
+Please follow these steps to run **all tests** locally:
- Setup your device (virtual or physical) via [these instructions](https://developer.android.com/training/testing/espresso/setup#set-up-environment).
-- We use `docker-compose`. You need to install it with [these instructions](https://docs.docker.com/compose/install/).
- Run `./docker-mailserver/run_email_server.sh` and wait while the email server will be started.
- Run `./script/run-all-tests.sh` to execute all tests.
- Run `./docker-mailserver/stop_email_server.sh` to stop the email server.
diff --git a/script/ci-install-android-sdk.sh b/script/ci-install-android-sdk.sh
index 6dc3252d9c..44ef73b577 100755
--- a/script/ci-install-android-sdk.sh
+++ b/script/ci-install-android-sdk.sh
@@ -10,7 +10,7 @@ else
touch ~/.android/repositories.cfg
fi
-SDK_ARCHIVE=sdk-tools-linux-4333796.zip
+SDK_ARCHIVE=commandlinetools-linux-6858069_latest.zip
sudo apt-get -qq install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils > /dev/null
sudo kvm-ok
@@ -24,19 +24,21 @@ else
# download, unpack and remove sdk archive
wget https://dl.google.com/android/repository/$SDK_ARCHIVE
unzip -qq $SDK_ARCHIVE -d $ANDROID_SDK_ROOT
+ cd $ANDROID_SDK_ROOT/cmdline-tools && mkdir latest && (ls | grep -v latest | xargs mv -t latest)
+ cd $SEMAPHORE_GIT_DIR
rm $SDK_ARCHIVE
- (echo "yes" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager --licenses > /dev/null | grep -v = || true)
- ( sleep 5; echo "y" ) | (${ANDROID_SDK_ROOT}/tools/bin/sdkmanager "build-tools;29.0.2" "platforms;android-29" > /dev/null | grep -v = || true)
- (${ANDROID_SDK_ROOT}/tools/bin/sdkmanager "extras;google;m2repository" | grep -v = || true)
- (${ANDROID_SDK_ROOT}/tools/bin/sdkmanager "cmdline-tools;latest" | grep -v = || true)
- (${ANDROID_SDK_ROOT}/tools/bin/sdkmanager "platform-tools" | grep -v = || true)
- (${ANDROID_SDK_ROOT}/tools/bin/sdkmanager "emulator" | grep -v = || true)
- (${ANDROID_SDK_ROOT}/tools/bin/sdkmanager "ndk;22.0.7026061" | grep -v = || true)
- (${ANDROID_SDK_ROOT}/tools/bin/sdkmanager "cmake;3.10.2.4988404" | grep -v = || true)
- (${ANDROID_SDK_ROOT}/tools/bin/sdkmanager "system-images;android-30;google_apis;x86" | grep -v = || true)
+ # Install Android SDK
+ (echo "yes" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null | grep -v = || true)
+ ( sleep 5; echo "y" ) | (${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.2" "platforms;android-29" > /dev/null | grep -v = || true)
+ (${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "extras;google;m2repository" | grep -v = || true)
+ (${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "platform-tools" | grep -v = || true)
+ (${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "emulator" | grep -v = || true)
+ (${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "ndk;22.0.7026061" | grep -v = || true)
+ (${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "cmake;3.10.2.4988404" | grep -v = || true)
+ (${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "system-images;android-30;google_apis;x86" | grep -v = || true)
fi
#Uncomment this for debug
-#~/Android/Sdk/tools/bin/${ANDROID_SDK_ROOT}/tools/bin/sdkmanager --list
+#${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --list