Created
September 6, 2016 20:53
-
-
Save heitorcolangelo/1e7cc97629faca62cf60086851b7654a to your computer and use it in GitHub Desktop.
UserDetailsActivity - testing text color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void whenEmailIsMissing_shouldDisplay_noInfoMessage() { | |
mActivityRule.launchActivity(createIntent(true)); | |
onView(withId(R.id.user_details_image)).check(matches(isDisplayed())); | |
onView(withId(R.id.user_details_name)).check(matches(isDisplayed())); | |
onView(allOf( | |
withId(R.id.image_and_text_image), | |
hasSibling(withText("No info available."))) | |
).check(matches(isDisplayed())); | |
onView(allOf( | |
withText("No info available."), | |
withTextColor(ContextCompat.getColor(mActivityRule.getActivity(), R.color.red))) | |
).check(matches(isDisplayed())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment