android - NoActivityResumedException when testing activity and fragment -
i have 1 activity on button and, inside activity, added fragment user can choose videos, , then, click on button on activity, , goes activity. i'm testing espresso, , when select videos , try click on button, see this
android.support.test.espresso.noactivityresumedexception: no activities in stage resumed. did forget launch activity. (test.getactivity() or similar)?
here test
public void testvideosselecttomix(){ selectvideoat(0); selectvideoat(1); // fails @ line: commit button on activity onview(allof(withid(r.id.commit))).perform(click()); onview(withtext(r.string.title_video_merge_fragment)).check(matches(isdisplayed())); }
i think may related listener on commit button, calls finish();
why work on emulator/device , not on tests?
Comments
Post a Comment