-
Notifications
You must be signed in to change notification settings - Fork 429
Conversation
Currently this test will fail as described in Issue #88 |
@alma-castant . please review this. |
@opticod I get notified for all PRs. No need to mention me ;) I will look at it as soon as I can |
@alma-castant This is a Espresso based UI testing class.This will test different Views and Buttons shown up in different orientations including landscape and portrait ,and the working of different click events on Buttons.It will also test the retain of app state working properly or not during orientation change.As mentioned above ,the retain of app state is fixed in #99 |
|
||
/** | ||
* Created by opticod(anupam) on 3/2/16. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this header as we don't use it
onView(withId(R.id.clotheLeft)).perform(click()); | ||
onView(withId(R.id.clothes)).check(matches(new DrawableMatcher(R.drawable.cloth4))); | ||
onView(withId(R.id.clotheRight)).perform(click()); | ||
onView(withId(R.id.clothes)).check(matches(new DrawableMatcher(R.drawable.cloth1))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this entire method you are testing the current setting with the current resources for clothes, face, etc. However, these can be changed or increased at any time. Therefore instead create a list with the elements we currently have so if they are ever changed, the test can be easily adapted. Also don't forget to test the head. Even if there is just one option now, there could be more in the future
@alma-castant , done with the changes. |
public void viewTest() { | ||
onView(withId(R.id.eyes)).check(matches(isDisplayed())); | ||
activityRule.getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); | ||
onView(withId(R.id.eyes)).check(matches(isDisplayed())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you changing the orientation after doing the check and not before?
Here is my First Test on AvatarRoomActivity.. #85