Skip to content

Commit 20ee136

Browse files
committed
wip
1 parent dede9e8 commit 20ee136

File tree

5 files changed

+7
-16
lines changed

5 files changed

+7
-16
lines changed

FlowCrypt/src/androidTest/java/com/flowcrypt/email/base/BaseTest.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ import jakarta.mail.Session
6161
import jakarta.mail.internet.MimeMessage
6262
import kotlinx.coroutines.runBlocking
6363
import org.hamcrest.MatcherAssert.assertThat
64-
import org.hamcrest.Matchers
6564
import org.hamcrest.Matchers.allOf
66-
import org.hamcrest.Matchers.hasItem
6765
import org.hamcrest.Matchers.hasToString
6866
import org.hamcrest.Matchers.`is`
6967
import org.hamcrest.Matchers.not
@@ -356,7 +354,7 @@ abstract class BaseTest : BaseActivityTestImplementation {
356354
intending(
357355
allOf(
358356
hasAction(Intent.ACTION_GET_CONTENT),
359-
hasCategories(hasItem(Matchers.equalTo(Intent.CATEGORY_OPENABLE))),
357+
hasCategories(setOf(Intent.CATEGORY_OPENABLE)),
360358
hasType(type)
361359
)
362360
).respondWith(Instrumentation.ActivityResult(Activity.RESULT_OK, resultData))

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import androidx.test.espresso.action.ViewActions.click
1616
import androidx.test.espresso.assertion.ViewAssertions.matches
1717
import androidx.test.espresso.intent.Intents.intending
1818
import androidx.test.espresso.intent.matcher.IntentMatchers
19+
import androidx.test.espresso.intent.matcher.IntentMatchers.hasCategories
1920
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
2021
import androidx.test.espresso.matcher.ViewMatchers.withId
2122
import androidx.test.espresso.matcher.ViewMatchers.withText
@@ -42,8 +43,6 @@ import com.flowcrypt.email.util.DateTimeUtil
4243
import com.flowcrypt.email.util.GeneralUtil
4344
import com.flowcrypt.email.util.PrivateKeysManager
4445
import com.flowcrypt.email.util.TestGeneralUtil
45-
import org.hamcrest.CoreMatchers
46-
import org.hamcrest.Matchers
4746
import org.hamcrest.Matchers.allOf
4847
import org.junit.AfterClass
4948
import org.junit.Rule
@@ -157,7 +156,7 @@ class PublicKeyDetailsFlowTest : BaseTest() {
157156
intending(
158157
allOf(
159158
IntentMatchers.hasAction(Intent.ACTION_CREATE_DOCUMENT),
160-
IntentMatchers.hasCategories(CoreMatchers.hasItem(Matchers.equalTo(Intent.CATEGORY_OPENABLE))),
159+
hasCategories(setOf(Intent.CATEGORY_OPENABLE)),
161160
IntentMatchers.hasType(Constants.MIME_TYPE_PGP_KEY)
162161
)
163162
)

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ import jakarta.mail.internet.InternetAddress
4949
import jakarta.mail.internet.MimeMessage
5050
import kotlinx.coroutines.runBlocking
5151
import org.bouncycastle.bcpg.ArmoredInputStream
52-
import org.hamcrest.CoreMatchers.hasItem
5352
import org.hamcrest.Matchers.allOf
54-
import org.hamcrest.Matchers.equalTo
5553
import org.junit.Assert.assertArrayEquals
5654
import org.junit.Rule
5755
import org.junit.Test
@@ -134,7 +132,7 @@ class PublicKeyDetailsHideArmorMetaFlowTest : BaseTest() {
134132
intending(
135133
allOf(
136134
hasAction(Intent.ACTION_CREATE_DOCUMENT),
137-
hasCategories(hasItem(equalTo(Intent.CATEGORY_OPENABLE))),
135+
hasCategories(setOf(Intent.CATEGORY_OPENABLE)),
138136
hasType(Constants.MIME_TYPE_PGP_KEY)
139137
)
140138
)

FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseBackupKeysFragmentTest.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
3-
* Contributors: DenBond7
3+
* Contributors: denbond7
44
*/
55

66
package com.flowcrypt.email.ui.base
@@ -17,8 +17,6 @@ import com.flowcrypt.email.Constants
1717
import com.flowcrypt.email.base.BaseTest
1818
import com.flowcrypt.email.junit.annotations.FlowCryptTestSettings
1919
import org.hamcrest.Matchers.allOf
20-
import org.hamcrest.Matchers.equalTo
21-
import org.hamcrest.Matchers.hasItem
2220
import java.io.File
2321

2422
/**
@@ -32,7 +30,7 @@ abstract class BaseBackupKeysFragmentTest : BaseTest(), AddAccountToDatabaseRule
3230
intending(
3331
allOf(
3432
hasAction(Intent.ACTION_CREATE_DOCUMENT),
35-
hasCategories(hasItem(equalTo(Intent.CATEGORY_OPENABLE))),
33+
hasCategories(setOf(Intent.CATEGORY_OPENABLE)),
3634
hasType(Constants.MIME_TYPE_PGP_KEY)
3735
)
3836
).respondWith(Instrumentation.ActivityResult(Activity.RESULT_OK, resultData))

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ import com.flowcrypt.email.util.DateTimeUtil
4242
import com.flowcrypt.email.util.GeneralUtil
4343
import com.flowcrypt.email.util.PrivateKeysManager
4444
import org.hamcrest.Matchers.allOf
45-
import org.hamcrest.Matchers.equalTo
46-
import org.hamcrest.Matchers.hasItem
4745
import org.junit.Before
4846
import org.junit.Rule
4947
import org.junit.Test
@@ -178,7 +176,7 @@ class PrivateKeyDetailsFragmentInIsolationTest : BaseTest() {
178176
intending(
179177
allOf(
180178
hasAction(Intent.ACTION_CREATE_DOCUMENT),
181-
hasCategories(hasItem(equalTo(Intent.CATEGORY_OPENABLE))),
179+
hasCategories(setOf(Intent.CATEGORY_OPENABLE)),
182180
hasType(Constants.MIME_TYPE_PGP_KEY)
183181
)
184182
).respondWith(Instrumentation.ActivityResult(Activity.RESULT_OK, resultData))

0 commit comments

Comments
 (0)