Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FlowCrypt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ dependencies {

implementation("com.google.android.gms:play-services-base:18.7.2")
implementation("com.google.android.gms:play-services-auth:21.4.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.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
* Contributors: DenBond7
* Contributors: denbond7
*/

package com.flowcrypt.email.ui
Expand Down Expand Up @@ -115,15 +115,15 @@ 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))
.check(matches(isDisplayed())).check(matches(withText(R.string.no_results)))
}

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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -114,4 +114,4 @@ class SearchMessagesGmailApiFlowTest : BaseGmailApiTest() {
)
)
}
}
}