Issue
Part of the Google Espresso code is the Menutest. You can find it Espresso menutest.
In this test you will see:
public void testContextMenu() {
onView(withText(R.string.context_item_2_text)).check(doesNotExist());
onView(withId(R.id.text_context_menu)).perform(longClick());
onView(withText(R.string.context_item_2_text)).check(matches(isDisplayed())).perform(click());
onView(withId(R.id.text_menu_result)).check(matches(withText(R.string.context_item_2_text)));
}
In this test you see that the contextmenu is started via a longClick. When I try to reproduce this test, the longClick() is not given via the Eclipse/Espresso 1.1 jar.
Do you have a valid Espresso context menu test? Please let me know. Please help.
Solution
Thanks to Yashodhan:
Just use this import:
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.longClick;
Yes, and it works! And the tests all went well.
Answered By - tm1701
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.