From 9b1c2b9b52c4237513ac057fb89a0bf7d1ada235 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 7 Sep 2025 20:01:48 +0000 Subject: [PATCH 1/3] Bump com.google.android.material:material from 1.12.0 to 1.13.0 Bumps [com.google.android.material:material](https://github.com/material-components/material-components-android) from 1.12.0 to 1.13.0. - [Release notes](https://github.com/material-components/material-components-android/releases) - [Commits](https://github.com/material-components/material-components-android/compare/1.12.0...1.13.0) --- updated-dependencies: - dependency-name: com.google.android.material:material dependency-version: 1.13.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- FlowCrypt/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowCrypt/build.gradle.kts b/FlowCrypt/build.gradle.kts index 0a0afb41f..ab194fb57 100644 --- a/FlowCrypt/build.gradle.kts +++ b/FlowCrypt/build.gradle.kts @@ -478,7 +478,7 @@ dependencies { implementation("com.google.android.gms:play-services-base:18.7.0") implementation("com.google.android.gms:play-services-auth:21.3.0") - implementation("com.google.android.material:material:1.12.0") + implementation("com.google.android.material:material:1.13.0") implementation("com.google.android.flexbox:flexbox:3.0.0") implementation("com.google.code.gson:gson:2.13.1") implementation("com.google.api-client:google-api-client-android:2.8.0") From 251a676af4266e6de0e822c03c7e9c838840bcc1 Mon Sep 17 00:00:00 2001 From: denbond7 Date: Sun, 14 Sep 2025 12:16:44 +0300 Subject: [PATCH 2/3] wip --- .../androidTest/java/com/flowcrypt/email/base/BaseTest.kt | 6 ++++++ .../java/com/flowcrypt/email/ui/RecipientsListFlowTest.kt | 2 +- .../flowcrypt/email/ui/SelectRecipientsFragmentFlowTest.kt | 6 +++--- .../email/ui/gmailapi/SearchMessagesGmailApiFlowTest.kt | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/base/BaseTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/base/BaseTest.kt index a611fd38d..df81ac88f 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/base/BaseTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/base/BaseTest.kt @@ -403,6 +403,12 @@ abstract class BaseTest : BaseActivityTestImplementation { } } + protected fun getIdentifierByName(name: String): Int { + return getTargetContext() + .resources + .getIdentifier(name, "id", getTargetContext().packageName) + } + companion object{ const val NOTIFICATION_RESOURCES_NAME = "com.android.systemui:id/expandableNotificationRow" diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/RecipientsListFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/RecipientsListFlowTest.kt index 1dc2eab03..2358a71ba 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/RecipientsListFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/RecipientsListFlowTest.kt @@ -129,7 +129,7 @@ class RecipientsListFlowTest : BaseRecipientsListTest() { onView(withId(R.id.menuSearch)) .check(matches(isDisplayed())) .perform(click()) - onView(withId(com.google.android.material.R.id.search_src_text)) + onView(withId(getIdentifierByName("search_src_text"))) .perform(clearText(), replaceText("00")) .perform(pressKey(KeyEvent.KEYCODE_ENTER)) closeSoftKeyboard() diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SelectRecipientsFragmentFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SelectRecipientsFragmentFlowTest.kt index ec551ef15..d46c42264 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SelectRecipientsFragmentFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SelectRecipientsFragmentFlowTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui @@ -115,7 +115,7 @@ class SelectRecipientsFragmentFlowTest : BaseTest() { onView(withId(R.id.menuSearch)) .check(matches(isDisplayed())) .perform(click()) - onView(withId(com.google.android.material.R.id.search_src_text)) + onView(withId(getIdentifierByName("search_src_text"))) .perform(clearText(), typeText("some email")) closeSoftKeyboard() onView(withId(R.id.tVEmpty)) @@ -123,7 +123,7 @@ class SelectRecipientsFragmentFlowTest : BaseTest() { } private fun checkIsTypedUserFound(viewId: Int, viewText: String) { - onView(withId(com.google.android.material.R.id.search_src_text)) + onView(withId(getIdentifierByName("search_src_text"))) .perform(clearText(), typeText(viewText)) closeSoftKeyboard() onView(withId(viewId)) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/SearchMessagesGmailApiFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/SearchMessagesGmailApiFlowTest.kt index 9554f79e5..06d147285 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/SearchMessagesGmailApiFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/SearchMessagesGmailApiFlowTest.kt @@ -97,7 +97,7 @@ class SearchMessagesGmailApiFlowTest : BaseGmailApiTest() { onView(withId(R.id.menuSearch)) .check(matches(isDisplayed())) .perform(click()) - onView(withId(com.google.android.material.R.id.search_src_text)) + onView(withId(getIdentifierByName("search_src_text"))) .perform(click(), clearText(), replaceText(SUBJECT_EXISTING_STANDARD)) .perform(pressKey(KeyEvent.KEYCODE_ENTER)) @@ -114,4 +114,4 @@ class SearchMessagesGmailApiFlowTest : BaseGmailApiTest() { ) ) } -} \ No newline at end of file +} From 972d2e9eb23418fa55f4aedfbd1b5fa96689309c Mon Sep 17 00:00:00 2001 From: denbond7 Date: Sun, 14 Sep 2025 18:21:40 +0300 Subject: [PATCH 3/3] Fixed AppBarLayoutBackgroundColorMatcher --- .../matchers/AppBarLayoutBackgroundColorMatcher.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/AppBarLayoutBackgroundColorMatcher.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/AppBarLayoutBackgroundColorMatcher.kt index 1ade48bf6..49f730141 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/AppBarLayoutBackgroundColorMatcher.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/AppBarLayoutBackgroundColorMatcher.kt @@ -1,14 +1,14 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.matchers -import android.graphics.drawable.ColorDrawable import android.view.View import androidx.test.espresso.matcher.BoundedMatcher import com.google.android.material.appbar.AppBarLayout +import com.google.android.material.shape.MaterialShapeDrawable import org.hamcrest.Description /** @@ -17,9 +17,11 @@ import org.hamcrest.Description class AppBarLayoutBackgroundColorMatcher(val color: Int) : BoundedMatcher(AppBarLayout::class.java) { public override fun matchesSafely(appBarLayout: AppBarLayout): Boolean { - return if (appBarLayout.background is ColorDrawable) { - color == (appBarLayout.background as ColorDrawable).color - } else false + return if (appBarLayout.background is MaterialShapeDrawable) { + (appBarLayout.background as MaterialShapeDrawable).fillColor?.defaultColor == color + } else { + false + } } override fun describeTo(description: Description) {