Is there a way to test using Espresso that the snackbar shows up with the right text?
I have a simple call to create a snackbar
Snackbar.make(mView, \"My
This worked for me, please try.
onView(allOf(withId(android.support.design.R.id.snackbar_text), withText("My text")))
.check(matches(isDisplayed()));
If you use AndroidX, please use the following:
onView(withId(com.google.android.material.R.id.snackbar_text))
.check(matches(withText(R.string.whatever_is_your_text)))