Skip to content

Commit e77b977

Browse files
committed
Fixed compilation issues
1 parent 1d0648e commit e77b977

13 files changed

Lines changed: 38 additions & 73 deletions

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

Lines changed: 5 additions & 6 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
@@ -42,9 +42,6 @@ import okhttp3.mockwebserver.Dispatcher
4242
import okhttp3.mockwebserver.MockResponse
4343
import okhttp3.mockwebserver.RecordedRequest
4444
import org.hamcrest.Matchers.allOf
45-
import org.hamcrest.Matchers.emptyString
46-
import org.hamcrest.Matchers.`is`
47-
import org.hamcrest.Matchers.not
4845
import org.junit.After
4946
import org.junit.Before
5047
import org.junit.Rule
@@ -463,7 +460,8 @@ class ComposeScreenExternalIntentsFlowTest : BaseTest() {
463460
.check(matches(withText(getRidOfCharacterSubstitutes(body.toString()))))
464461
} else {
465462
onView(withId(R.id.editTextEmailMessage))
466-
.check(matches(isDisplayed())).check(matches(withText(`is`(emptyString()))))
463+
.check(matches(isDisplayed()))
464+
.check(matches(withText("")))
467465
}
468466
}
469467

@@ -474,7 +472,8 @@ class ComposeScreenExternalIntentsFlowTest : BaseTest() {
474472
.check(matches(withText(getRidOfCharacterSubstitutes(subject))))
475473
} else {
476474
onView(withId(R.id.editTextEmailSubject))
477-
.check(matches(isDisplayed())).check(matches(withText(`is`(emptyString()))))
475+
.check(matches(isDisplayed()))
476+
.check(matches(withText("")))
478477
}
479478
}
480479

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ import org.apache.commons.io.FileUtils
7272
import org.hamcrest.Description
7373
import org.hamcrest.Matcher
7474
import org.hamcrest.Matchers.allOf
75-
import org.hamcrest.Matchers.emptyString
7675
import org.hamcrest.Matchers.`is`
7776
import org.hamcrest.Matchers.not
7877
import org.junit.Assert.assertEquals
@@ -152,7 +151,7 @@ class ComposeScreenFlowTest : BaseComposeScreenTest() {
152151
)
153152
onView(withId(R.id.editTextEmailSubject))
154153
.perform(scrollTo(), click(), typeText("subject"), clearText())
155-
.check(matches(withText(`is`(emptyString()))))
154+
.check(matches(withText("")))
156155
onView(withId(R.id.menuActionSend))
157156
.check(matches(isDisplayed()))
158157
.perform(click())
@@ -177,7 +176,7 @@ class ComposeScreenFlowTest : BaseComposeScreenTest() {
177176
.perform(scrollTo(), click(), replaceText(EMAIL_SUBJECT))
178177
onView(withId(R.id.editTextEmailMessage))
179178
.perform(scrollTo(), click(), replaceText(""))
180-
.check(matches(withText(`is`(emptyString()))))
179+
.check(matches(withText("")))
181180
Espresso.closeSoftKeyboard()
182181
onView(withId(R.id.menuActionSend))
183182
.check(matches(isDisplayed()))
@@ -265,7 +264,7 @@ class ComposeScreenFlowTest : BaseComposeScreenTest() {
265264
.check(matches(withRecyclerViewItemCount(1)))
266265
onView(withId(R.id.editTextEmailSubject))
267266
.perform(scrollTo())
268-
.check(matches(withText(`is`(emptyString()))))
267+
.check(matches(withText("")))
269268
}
270269

271270
@Test

FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SearchMessagesFlowTest.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
@@ -34,9 +34,7 @@ import com.flowcrypt.email.rules.RetryRule
3434
import com.flowcrypt.email.rules.ScreenshotTestRule
3535
import com.flowcrypt.email.ui.activity.MainActivity
3636
import com.flowcrypt.email.util.AccountDaoManager
37-
import org.hamcrest.Matchers.`is`
3837
import org.hamcrest.Matchers.allOf
39-
import org.hamcrest.Matchers.emptyString
4038
import org.hamcrest.Matchers.not
4139
import org.junit.Before
4240
import org.junit.Rule
@@ -144,7 +142,7 @@ class SearchMessagesFlowTest : BaseTest() {
144142
onView(withId(androidx.appcompat.R.id.search_close_btn))
145143
.perform(click())
146144
onView(isAssignableFrom(EditText::class.java))
147-
.check(matches(withText(`is`(emptyString()))))
145+
.check(matches(withText("")))
148146
}
149147

150148
companion object {

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

Lines changed: 1 addition & 2 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
@@ -42,7 +42,6 @@ import com.flowcrypt.email.ui.activity.CreateMessageActivity
4242
import com.flowcrypt.email.util.AccountDaoManager
4343
import com.flowcrypt.email.util.TestGeneralUtil
4444
import org.hamcrest.Matchers.allOf
45-
import org.hamcrest.Matchers.emptyString
4645
import org.hamcrest.Matchers.`is`
4746
import org.hamcrest.Matchers.not
4847
import org.junit.Rule

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

Lines changed: 3 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
@@ -15,8 +15,6 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
1515
import androidx.test.espresso.matcher.ViewMatchers.withId
1616
import androidx.test.espresso.matcher.ViewMatchers.withText
1717
import com.flowcrypt.email.R
18-
import org.hamcrest.Matchers.emptyString
19-
import org.hamcrest.Matchers.`is`
2018
import org.junit.Test
2119

2220
/**
@@ -102,6 +100,7 @@ abstract class BasePassphraseFlowTest : BaseCheckPassphraseOnFirstScreenFlowTest
102100

103101
testShowRepeatingPassPhraseScreen()
104102
onView(withId(R.id.editTextKeyPasswordSecond))
105-
.check(matches(isDisplayed())).check(matches(withText(`is`(emptyString()))))
103+
.check(matches(isDisplayed()))
104+
.check(matches(withText("")))
106105
}
107106
}

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import com.flowcrypt.email.ui.activity.fragment.AddOtherAccountFragment
3535
import com.flowcrypt.email.ui.base.AddOtherAccountBaseTest
3636
import com.flowcrypt.email.util.AuthCredentialsManager
3737
import org.hamcrest.Matchers.allOf
38-
import org.hamcrest.Matchers.emptyString
3938
import org.hamcrest.Matchers.instanceOf
4039
import org.hamcrest.Matchers.`is`
4140
import org.hamcrest.Matchers.not
@@ -95,12 +94,12 @@ class AddOtherAccountFragmentInIsolationTest : AddOtherAccountBaseTest() {
9594
@Test
9695
fun testIsPasswordFieldsAlwaysEmptyAtStart() {
9796
onView(withId(R.id.editTextPassword))
98-
.check(matches(withText(`is`(emptyString()))))
97+
.check(matches(withText("")))
9998
enableAdvancedMode()
10099
onView(withId(R.id.checkBoxRequireSignInForSmtp))
101100
.perform(scrollTo(), click())
102101
onView(withId(R.id.editTextSmtpPassword))
103-
.check(matches(withText(`is`(emptyString()))))
102+
.check(matches(withText("")))
104103
}
105104

106105
@Test
@@ -190,7 +189,8 @@ class AddOtherAccountFragmentInIsolationTest : AddOtherAccountBaseTest() {
190189
.check(matches(isDisplayed()))
191190
onView(withId(R.id.editTextSmtpPassword))
192191
.perform(scrollTo())
193-
.check(matches(isDisplayed())).check(matches(withText(`is`(emptyString()))))
192+
.check(matches(isDisplayed()))
193+
.check(matches(withText("")))
194194

195195
onView(withId(R.id.checkBoxRequireSignInForSmtp))
196196
.perform(scrollTo(), click())
@@ -217,13 +217,13 @@ class AddOtherAccountFragmentInIsolationTest : AddOtherAccountBaseTest() {
217217
.perform(scrollTo(), clearText(), typeText(invalidEmailAddress), closeSoftKeyboard())
218218
onView(withId(R.id.editTextUserName))
219219
.perform(scrollTo())
220-
.check(matches(withText(`is`(emptyString()))))
220+
.check(matches(withText("")))
221221
onView(withId(R.id.editTextImapServer))
222222
.perform(scrollTo())
223-
.check(matches(withText(`is`(emptyString()))))
223+
.check(matches(withText("")))
224224
onView(withId(R.id.editTextSmtpServer))
225225
.perform(scrollTo())
226-
.check(matches(withText(`is`(emptyString()))))
226+
.check(matches(withText("")))
227227
}
228228

229229
val text = userName + TestConstants.COMMERCIAL_AT_SYMBOL + host

FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/CreatePrivateKeySecondFragmentInIsolationTest.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.fragment.isolation.incontainer
@@ -24,8 +24,6 @@ import com.flowcrypt.email.ui.activity.fragment.CreatePrivateKeySecondFragment
2424
import com.flowcrypt.email.ui.activity.fragment.CreatePrivateKeySecondFragmentArgs
2525
import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface
2626
import com.flowcrypt.email.util.AccountDaoManager
27-
import org.hamcrest.Matchers.emptyString
28-
import org.hamcrest.Matchers.`is`
2927
import org.junit.Before
3028
import org.junit.Rule
3129
import org.junit.Test
@@ -64,7 +62,7 @@ class CreatePrivateKeySecondFragmentInIsolationTest : BaseTest(),
6462
onView(withId(R.id.textViewSecondPasswordCheckTitle))
6563
.check(matches(withText(getResString(R.string.set_up_flow_crypt, getResString(R.string.app_name)))))
6664
onView(withId(R.id.editTextKeyPasswordSecond))
67-
.check(matches(withText(`is`(emptyString()))))
65+
.check(matches(withText("")))
6866

6967
onView(withId(R.id.buttonConfirmPassPhrases))
7068
.perform(click())

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import androidx.test.filters.MediumTest
1717
import com.flowcrypt.email.R
1818
import com.flowcrypt.email.base.BaseTest
1919
import com.flowcrypt.email.database.entity.PublicKeyEntity
20-
import com.flowcrypt.email.junit.annotations.DependsOnMailServer
2120
import com.flowcrypt.email.junit.annotations.FlowCryptTestSettings
2221
import com.flowcrypt.email.rules.AddPrivateKeyToDatabaseRule
2322
import com.flowcrypt.email.rules.ClearAppSettingsRule
@@ -27,10 +26,6 @@ import com.flowcrypt.email.rules.ScreenshotTestRule
2726
import com.flowcrypt.email.ui.activity.fragment.EditContactFragment
2827
import com.flowcrypt.email.ui.activity.fragment.EditContactFragmentArgs
2928
import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface
30-
import org.hamcrest.CoreMatchers.`is`
31-
import org.hamcrest.CoreMatchers.startsWith
32-
import org.hamcrest.Matchers
33-
import org.hamcrest.Matchers.emptyString
3429
import org.junit.Before
3530
import org.junit.Rule
3631
import org.junit.Test
@@ -75,7 +70,7 @@ class EditContactFragmentInIsolationTest : BaseTest(), AddAccountToDatabaseRuleI
7570
Thread.sleep(1000)
7671

7772
onView(withId(R.id.editTextNewPubKey))
78-
.check(matches(withText(`is`(emptyString()))))
73+
.check(matches(withText("")))
7974
onView(withId(R.id.buttonCheck))
8075
.check(matches(isNotEnabled()))
8176

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ import com.flowcrypt.email.rules.RetryRule
2121
import com.flowcrypt.email.rules.ScreenshotTestRule
2222
import com.flowcrypt.email.ui.activity.fragment.ImportRecipientsFromSourceFragment
2323
import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface
24-
import org.hamcrest.CoreMatchers
25-
import org.hamcrest.CoreMatchers.`is`
26-
import org.hamcrest.Matchers
27-
import org.hamcrest.Matchers.emptyString
2824
import org.junit.Before
2925
import org.junit.Rule
3026
import org.junit.Test
@@ -60,6 +56,6 @@ class ImportRecipientsFromSourceFragmentInIsolationTest : BaseTest(),
6056
Thread.sleep(1000)
6157

6258
onView(withId(R.id.eTKeyIdOrEmail))
63-
.check(matches(withText(`is`(emptyString()))))
59+
.check(matches(withText("")))
6460
}
6561
}

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import com.flowcrypt.email.rules.RetryRule
2323
import com.flowcrypt.email.rules.ScreenshotTestRule
2424
import com.flowcrypt.email.ui.activity.fragment.ServerSettingsFragment
2525
import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface
26-
import org.hamcrest.Matchers.emptyString
27-
import org.hamcrest.Matchers.`is`
2826
import org.junit.Before
2927
import org.junit.Rule
3028
import org.junit.Test
@@ -66,7 +64,7 @@ class ServerSettingsFragmentInIsolationTest : BaseTest(), AddAccountToDatabaseRu
6664
.check(matches(isNotEnabled()))
6765
.check(matches(withText(account.username)))
6866
onView(withId(R.id.editTextPassword))
69-
.check(matches(withText(`is`(emptyString()))))
67+
.check(matches(withText("")))
7068
onView(withId(R.id.editTextImapServer))
7169
.check(matches(withText(account.imapServer)))
7270
onView(withId(R.id.editTextImapPort))
@@ -81,6 +79,6 @@ class ServerSettingsFragmentInIsolationTest : BaseTest(), AddAccountToDatabaseRu
8179
onView(withId(R.id.editTextSmtpUsername))
8280
.check(matches(withText(account.smtpUsername)))
8381
onView(withId(R.id.editTextSmtpPassword))
84-
.check(matches(withText(`is`(emptyString()))))
82+
.check(matches(withText("")))
8583
}
8684
}

0 commit comments

Comments
 (0)