Skip to content

Commit 9df880b

Browse files
authored
Merge branch 'master' into dependabot/gradle/androidx.navigation.safeargs.kotlin-2.9.4
2 parents b9b1a0c + c326c7a commit 9df880b

6 files changed

Lines changed: 23 additions & 15 deletions

File tree

FlowCrypt/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ dependencies {
436436
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.3.0")
437437
androidTestImplementation("androidx.room:room-testing:2.7.2")
438438
androidTestImplementation("androidx.arch.core:core-testing:2.2.0")
439-
androidTestImplementation("androidx.work:work-testing:2.10.3")
439+
androidTestImplementation("androidx.work:work-testing:2.10.4")
440440
androidTestImplementation("com.squareup.okhttp3:mockwebserver:5.1.0")
441441
androidTestImplementation("com.squareup.okhttp3:okhttp-tls:5.1.0")
442442
androidTestImplementation("com.athaydes.rawhttp:rawhttp-core:2.6.0")
@@ -477,17 +477,17 @@ dependencies {
477477
implementation("androidx.preference:preference-ktx:1.2.1")
478478
implementation("androidx.core:core-ktx:1.17.0")
479479
implementation("androidx.core:core-splashscreen:1.0.1")
480-
implementation("androidx.activity:activity-ktx:1.10.1")
480+
implementation("androidx.activity:activity-ktx:1.11.0")
481481
implementation("androidx.fragment:fragment-ktx:1.8.9")
482-
implementation("androidx.work:work-runtime-ktx:2.10.3")
482+
implementation("androidx.work:work-runtime-ktx:2.10.4")
483483
implementation("androidx.navigation:navigation-fragment-ktx:2.9.3")
484484
implementation("androidx.navigation:navigation-ui-ktx:2.9.3")
485485
implementation("androidx.navigation:navigation-runtime-ktx:2.9.3")
486486
implementation("androidx.webkit:webkit:1.14.0")
487487

488488
implementation("com.google.android.gms:play-services-base:18.7.2")
489489
implementation("com.google.android.gms:play-services-auth:21.4.0")
490-
implementation("com.google.android.material:material:1.12.0")
490+
implementation("com.google.android.material:material:1.13.0")
491491
implementation("com.google.android.flexbox:flexbox:3.0.0")
492492
implementation("com.google.code.gson:gson:2.13.1")
493493
implementation("com.google.api-client:google-api-client-android:2.8.1")

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ abstract class BaseTest : BaseActivityTestImplementation {
403403
}
404404
}
405405
406+
protected fun getIdentifierByName(name: String): Int {
407+
return getTargetContext()
408+
.resources
409+
.getIdentifier(name, "id", getTargetContext().packageName)
410+
}
411+
406412
companion object{
407413
const val NOTIFICATION_RESOURCES_NAME =
408414
"com.android.systemui:id/expandableNotificationRow"

FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/AppBarLayoutBackgroundColorMatcher.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
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.matchers
77

8-
import android.graphics.drawable.ColorDrawable
98
import android.view.View
109
import androidx.test.espresso.matcher.BoundedMatcher
1110
import com.google.android.material.appbar.AppBarLayout
11+
import com.google.android.material.shape.MaterialShapeDrawable
1212
import org.hamcrest.Description
1313

1414
/**
@@ -17,9 +17,11 @@ import org.hamcrest.Description
1717
class AppBarLayoutBackgroundColorMatcher(val color: Int) :
1818
BoundedMatcher<View, AppBarLayout>(AppBarLayout::class.java) {
1919
public override fun matchesSafely(appBarLayout: AppBarLayout): Boolean {
20-
return if (appBarLayout.background is ColorDrawable) {
21-
color == (appBarLayout.background as ColorDrawable).color
22-
} else false
20+
return if (appBarLayout.background is MaterialShapeDrawable) {
21+
(appBarLayout.background as MaterialShapeDrawable).fillColor?.defaultColor == color
22+
} else {
23+
false
24+
}
2325
}
2426

2527
override fun describeTo(description: Description) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class RecipientsListFlowTest : BaseRecipientsListTest() {
129129
onView(withId(R.id.menuSearch))
130130
.check(matches(isDisplayed()))
131131
.perform(click())
132-
onView(withId(com.google.android.material.R.id.search_src_text))
132+
onView(withId(getIdentifierByName("search_src_text")))
133133
.perform(clearText(), replaceText("00"))
134134
.perform(pressKey(KeyEvent.KEYCODE_ENTER))
135135
closeSoftKeyboard()

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

Lines changed: 3 additions & 3 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
@@ -115,15 +115,15 @@ class SelectRecipientsFragmentFlowTest : BaseTest() {
115115
onView(withId(R.id.menuSearch))
116116
.check(matches(isDisplayed()))
117117
.perform(click())
118-
onView(withId(com.google.android.material.R.id.search_src_text))
118+
onView(withId(getIdentifierByName("search_src_text")))
119119
.perform(clearText(), typeText("some email"))
120120
closeSoftKeyboard()
121121
onView(withId(R.id.tVEmpty))
122122
.check(matches(isDisplayed())).check(matches(withText(R.string.no_results)))
123123
}
124124

125125
private fun checkIsTypedUserFound(viewId: Int, viewText: String) {
126-
onView(withId(com.google.android.material.R.id.search_src_text))
126+
onView(withId(getIdentifierByName("search_src_text")))
127127
.perform(clearText(), typeText(viewText))
128128
closeSoftKeyboard()
129129
onView(withId(viewId))

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class SearchMessagesGmailApiFlowTest : BaseGmailApiTest() {
9797
onView(withId(R.id.menuSearch))
9898
.check(matches(isDisplayed()))
9999
.perform(click())
100-
onView(withId(com.google.android.material.R.id.search_src_text))
100+
onView(withId(getIdentifierByName("search_src_text")))
101101
.perform(click(), clearText(), replaceText(SUBJECT_EXISTING_STANDARD))
102102
.perform(pressKey(KeyEvent.KEYCODE_ENTER))
103103

@@ -114,4 +114,4 @@ class SearchMessagesGmailApiFlowTest : BaseGmailApiTest() {
114114
)
115115
)
116116
}
117-
}
117+
}

0 commit comments

Comments
 (0)