Skip to content

Commit

Permalink
Marked some disabled flaky tests as flaky.| #2642
Browse files Browse the repository at this point in the history
  • Loading branch information
DenBond7 committed May 16, 2024
1 parent 342cc9c commit ecc01cb
Show file tree
Hide file tree
Showing 27 changed files with 54 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ import kotlin.random.Random
@FlowCryptTestSettings(useIntents = true, useCommonIdling = false)
@MediumTest
@RunWith(AndroidJUnit4::class)
@Ignore("Should be fixed before the next release")
class AttachmentDownloadingProgressFlowTest : BaseMessageDetailsFlowTest() {
private val simpleAttInfo = TestGeneralUtil.getObjectFromJson(
"messages/attachments/simple_att.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
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.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand All @@ -42,7 +43,6 @@ import org.junit.runner.RunWith
@MediumTest
@RunWith(AndroidJUnit4::class)
@FlowCryptTestSettings(useCommonIdling = false)
@Ignore("Should be fixed before the next release")
class ComposeScreenNoKeyAvailableCreateNewKeyFlowTest : BaseComposeScreenNoKeyAvailableTest() {
private val addPrivateKeyToDatabaseRule = AddPrivateKeyToDatabaseRule(
keyPath = "pgp/[email protected]_keyA_strong.asc",
Expand All @@ -60,6 +60,7 @@ class ComposeScreenNoKeyAvailableCreateNewKeyFlowTest : BaseComposeScreenNoKeyAv
.around(ScreenshotTestRule())

@Test
@FlakyTest
fun testCreatingNewKey() {
doBaseActions {
onView(withText(R.string.create_a_new_key))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
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.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -60,7 +61,7 @@ class ComposeScreenNoKeyAvailableMultipleKeysWithPassphraseInDatabaseFlowTest :
.around(ScreenshotTestRule())

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testAddEmailToExistingKey() {
doTestAddEmailToExistingKey {
waitForObjectWithText(getResString(android.R.string.ok), 2000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
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.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -58,7 +59,7 @@ class ComposeScreenNoKeyAvailableSingleKeyWithPassphraseInDatabaseFlowTest : Bas
.around(ScreenshotTestRule())

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testImportKey() {
doBaseActions {
addTextToClipboard("private key", requireNotNull(pgpKeyDetails.privateKey))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.test.espresso.assertion.ViewAssertions.doesNotExist
import androidx.test.espresso.matcher.RootMatchers
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand All @@ -36,7 +37,6 @@ import org.junit.runner.RunWith
@MediumTest
@RunWith(AndroidJUnit4::class)
@FlowCryptTestSettings(useCommonIdling = false)
@Ignore("Should be fixed before the next release")
class ComposeScreenNoKeyAvailableSingleKeyWithPassphraseInRamFlowTest : BaseComposeScreenNoKeyAvailableTest() {
private val addPrivateKeyToDatabaseRule = AddPrivateKeyToDatabaseRule(
keyPath = "pgp/[email protected]_keyA_strong.asc",
Expand All @@ -54,6 +54,7 @@ class ComposeScreenNoKeyAvailableSingleKeyWithPassphraseInRamFlowTest : BaseComp
.around(ScreenshotTestRule())

@Test
@FlakyTest
fun testAddEmailToExistingKey() {
doTestAddEmailToExistingKey {
onView(withId(R.id.buttonOk))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
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.FlakyTest
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.By
Expand Down Expand Up @@ -58,7 +59,6 @@ import org.junit.runner.RunWith
@FlowCryptTestSettings(useIntents = true)
@MediumTest
@RunWith(AndroidJUnit4::class)
@Ignore("Should be fixed before the next release")
class EndPassPhraseSessionFlowTest : BaseTest() {
private val addAccountToDatabaseRule = AddAccountToDatabaseRule()
private val addPrivateKeyToDatabaseRule = AddPrivateKeyToDatabaseRule(
Expand Down Expand Up @@ -90,6 +90,7 @@ class EndPassPhraseSessionFlowTest : BaseTest() {
.around(ScreenshotTestRule())

@Test
@FlakyTest
fun testEndPassPhraseSessionButton() {
val timeout = 5000L
val activePassPhraseSessionLabel = getResString(R.string.active_passphrase_session)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
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.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -72,7 +73,7 @@ class ImportAdditionalPrivateKeysFlowTest : BaseTest() {

@Test
@DependsOnMailServer
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testButtonImportBackup() {
onView(withId(R.id.buttonImportBackup))
.check(matches(isDisplayed()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
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.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -298,7 +299,7 @@ class MainSignInFragmentFlowTest : BaseSignTest() {
}

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testFailAttesterSubmit() {
setupAndClickSignInButton(genMockGoogleSignInAccountJson(EMAIL_FES_ENFORCE_ATTESTER_SUBMIT))
unregisterCountingIdlingResource()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class MessageDetailsFlowTest : BaseMessageDetailsFlowTest() {
}

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testDecryptionError_KEY_MISMATCH_MissingKeyErrorImportKey() {
testMissingKey(
getMsgInfo(
Expand Down Expand Up @@ -266,7 +266,7 @@ class MessageDetailsFlowTest : BaseMessageDetailsFlowTest() {
}

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testDecryptionError_FORMAT_BadlyFormattedMsg() {
val msgInfo = getMsgInfo(
path = "messages/info/encrypted_msg_info_text_error_badly_formatted.json",
Expand Down Expand Up @@ -355,7 +355,7 @@ class MessageDetailsFlowTest : BaseMessageDetailsFlowTest() {
}

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testMissingKeyErrorChooseFromFewPubKeys() {
val msgInfo = getMsgInfo(
path = "messages/info/encrypted_msg_info_text_with_missing_key.json",
Expand Down Expand Up @@ -691,7 +691,7 @@ class MessageDetailsFlowTest : BaseMessageDetailsFlowTest() {
}

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testSignedMsgClearSignBroken() {
val msgInfo = getMsgInfo(
path = "messages/info/signed_msg_clearsign_broken.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.test.espresso.matcher.RootMatchers.isDialog
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -118,7 +119,7 @@ class RefreshKeysFromEkmFlowTest : BaseRefreshKeysFromEkmFlowTest() {
}

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testUpdatePrvKeyFromEkmShowFixMissingPassphrase() {
val keysStorage = KeysStorageImpl.getInstance(getTargetContext())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
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.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -105,7 +106,7 @@ class UpdatePrivateKeyWithPassPhraseInRamFlowTest : BaseTest() {
.around(ScreenshotTestRule())

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testUpdateSuccess() {
Thread.sleep(1000)
val dateFormat = DateTimeUtil.getPgpDateFormat(getTargetContext())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,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.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.base.BaseTest
Expand Down Expand Up @@ -53,7 +54,7 @@ class ImportAdditionalPrivateKeysFragmentInIsolationTest : BaseTest() {
}

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testButtonLoadFromClipboardVisibility() {
onView(withId(R.id.buttonLoadFromClipboard))
.check(matches(isDisplayed()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withChild
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.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.base.BaseTest
Expand Down Expand Up @@ -140,7 +141,7 @@ class ParseAndSavePubKeysFragmentInIsolationTest : BaseTest() {
}

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testIsDisplayedLabelAlreadyImported() {
launchFragmentInContainer<ParseAndSavePubKeysFragment>(
fragmentArgs = ParseAndSavePubKeysFragmentArgs(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,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.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -72,7 +73,7 @@ class PrivateKeysListFragmentEkmInIsolationTest : BaseTest() {
.around(ScreenshotTestRule())

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testAddNewKeyGone() {
launchFragmentInContainer<PrivateKeysListFragment>()
onView(withId(R.id.floatActionButtonAddKey))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -50,7 +51,6 @@ import org.junit.runner.RunWith
message = BaseComposeScreenTest.MESSAGE,
subject = BaseComposeScreenTest.SUBJECT
)
@Ignore("Should be fixed before the next release")
class EncryptedComposeGmailApiFlow : BaseComposeGmailFlow() {
override val mockWebServerRule =
FlowCryptMockWebServerRule(TestConstants.MOCK_WEB_SERVER_PORT, object : Dispatcher() {
Expand All @@ -73,6 +73,7 @@ class EncryptedComposeGmailApiFlow : BaseComposeGmailFlow() {
.around(ScreenshotTestRule())

@Test
@FlakyTest
fun testSending() {
//enqueue outgoing message
onView(withId(R.id.menuActionSend))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.test.espresso.contrib.RecyclerViewActions
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -84,7 +85,7 @@ class EncryptedForwardOfEncryptedMessageWithOriginalAttachmentsComposeGmailApiFl
.around(ScreenshotTestRule())

@Test
@Ignore("Should be fixed before the next release")
@FlakyTest
fun testSending() {
//need to wait while the app loads the messages list
Thread.sleep(2000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
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.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -64,7 +65,6 @@ import org.junit.runner.RunWith
subject = "",
isNew = false
)
@Ignore("Should be fixed before the next release")
class EncryptedForwardOfStandardMessageWithOriginalAttachmentsComposeGmailApiFlow : BaseComposeGmailFlow() {
override val mockWebServerRule =
FlowCryptMockWebServerRule(TestConstants.MOCK_WEB_SERVER_PORT, object : Dispatcher() {
Expand All @@ -87,6 +87,7 @@ class EncryptedForwardOfStandardMessageWithOriginalAttachmentsComposeGmailApiFlo
.around(ScreenshotTestRule())

@Test
@FlakyTest
fun testSending() {
//need to wait while the app loads the messages list
Thread.sleep(2000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.test.espresso.contrib.RecyclerViewActions
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -62,7 +63,6 @@ import org.junit.runner.RunWith
subject = "",
isNew = false
)
@Ignore("Should be fixed before the next release")
class EncryptedReplyAllComposeGmailApiFlow : BaseComposeGmailFlow() {
override val mockWebServerRule =
FlowCryptMockWebServerRule(TestConstants.MOCK_WEB_SERVER_PORT, object : Dispatcher() {
Expand All @@ -85,6 +85,7 @@ class EncryptedReplyAllComposeGmailApiFlow : BaseComposeGmailFlow() {
.around(ScreenshotTestRule())

@Test
@FlakyTest
fun testSending() {
//need to wait while the app loads the messages list
Thread.sleep(2000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
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.FlakyTest
import androidx.test.filters.MediumTest
import com.flowcrypt.email.R
import com.flowcrypt.email.TestConstants
Expand Down Expand Up @@ -63,7 +64,6 @@ import org.junit.runner.RunWith
subject = "",
isNew = false
)
@Ignore("Should be fixed before the next release")
class EncryptedReplyComposeGmailApiFlow : BaseComposeGmailFlow() {
override val mockWebServerRule =
FlowCryptMockWebServerRule(TestConstants.MOCK_WEB_SERVER_PORT, object : Dispatcher() {
Expand All @@ -86,6 +86,7 @@ class EncryptedReplyComposeGmailApiFlow : BaseComposeGmailFlow() {
.around(ScreenshotTestRule())

@Test
@FlakyTest
fun testSending() {
//need to wait while the app loads the messages list
Thread.sleep(2000)
Expand Down
Loading

0 comments on commit ecc01cb

Please sign in to comment.