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
I saw the previous answers but I thought this would be better.
@Test
public void onFabClick_shouldDisplaySnackbar() throws Exception {
onView(withId(R.id.fab)).perform(click());
// Compare with the text message of snackbar
onView(withText(R.string.snackbar_message))
.check(matches(isDisplayed()));
}