With Espresso is it possible to simplify those two statements ?
onView(withText(expectedErrorTitle))
.check(matches(isDisplayed()));
onView(withText(expectedErrorMessage))
.check(matches(isDisplayed()));
I tried with this one but it doesn't work :
onView(allOf(
withText(expectedErrorTitle),
withText(expectedErrorMessage)
)).check(matches(isDisplayed()));