Open GoogleCodeExporter opened 9 years ago
Hi, i have the following test
@RunWith(AndroidJUnit4.class) @LargeTest public class JobTests {
MyApp app; @Rule public ActivityTestRule<MainActivity> mActivity = new ActivityTestRule<>(MainActivity.class, false, false); @Before public void setUp() throws Exception { app = (MyApp) InstrumentationRegistry.getInstrumentation().getTargetContext().getApplicationContext(); }} @Test public void testActivityAndWait2Sec() { mActivity.launchActivity(new Intent()); onView(isRoot()).perform(waitAtLeast(2000)); }
public ViewAction waitAtLeast(final long millis) { return new ViewAction() { @Override public Matcher getConstraints() { return allOf(anything()); }
@Override public String getDescription() { return "wait for at least " + millis + " millis."; } @Override public void perform(final UiController uiController, final View view) { uiController.loopMainThreadUntilIdle(); uiController.loopMainThreadForAtLeast(millis); } }; }
}
Why is this happening?
Original issue reported on code.google.com by bmpa...@gmail.com on 24 Aug 2015 at 1:54
bmpa...@gmail.com
Attachments:
this is happening if i have compileSdkVersion 23
Original comment by bmpa...@gmail.com on 24 Aug 2015 at 2:49
@RunWith(AndroidJUnit4.class) @LargeTest public class JobTests {
public ViewAction waitAtLeast(final long millis) { return new ViewAction() { @Override public Matcher getConstraints() {
return allOf(anything());
}
}
Original issue reported on code.google.com by
bmpa...@gmail.com
on 24 Aug 2015 at 1:54Attachments: