Skip to content

Commit c326c7a

Browse files
Bump com.google.android.material:material from 1.12.0 to 1.13.0 (#3113)
* 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](material-components/material-components-android@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] <support@github.com> * wip * Fixed AppBarLayoutBackgroundColorMatcher --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Den <DenBond7@gmail.com>
1 parent 2b7338e commit c326c7a

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

FlowCrypt/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ dependencies {
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)