From 70814cc8dcedab8043061bc2342c056c30a5a8a3 Mon Sep 17 00:00:00 2001 From: Victor Andreasson Date: Sun, 9 Jun 2024 19:19:08 +0200 Subject: [PATCH] Add a few more sleeps to flaky Espresso tests Signed-off-by: Victor Andreasson --- .../androidTest/java/com/orgzly/android/espresso/BookTest.java | 1 + .../java/com/orgzly/android/espresso/QueryFragmentTest.java | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/androidTest/java/com/orgzly/android/espresso/BookTest.java b/app/src/androidTest/java/com/orgzly/android/espresso/BookTest.java index e94588c37..532959c55 100644 --- a/app/src/androidTest/java/com/orgzly/android/espresso/BookTest.java +++ b/app/src/androidTest/java/com/orgzly/android/espresso/BookTest.java @@ -444,6 +444,7 @@ public void testSetDeadlineTimeForNewNote() { onView(withId(R.id.date_picker_button)).perform(click()); onView(withClassName(equalTo(DatePicker.class.getName()))).perform(setDate(2014, 4, 1)); onView(withText(android.R.string.ok)).perform(click()); + SystemClock.sleep(100); onView(withText(R.string.set)).perform(click()); onView(withId(R.id.deadline_button)).check(matches(withText(userDateTime("<2014-04-01 Tue>")))); } diff --git a/app/src/androidTest/java/com/orgzly/android/espresso/QueryFragmentTest.java b/app/src/androidTest/java/com/orgzly/android/espresso/QueryFragmentTest.java index ccb0f7e98..e9dc4bedb 100644 --- a/app/src/androidTest/java/com/orgzly/android/espresso/QueryFragmentTest.java +++ b/app/src/androidTest/java/com/orgzly/android/espresso/QueryFragmentTest.java @@ -246,6 +246,7 @@ public void testClickingNote() { defaultSetUp(); onView(allOf(withText("book-two"), isDisplayed())).perform(click()); + SystemClock.sleep(100); searchForTextCloseKeyboard("b.book-two Note"); onView(withId(R.id.fragment_query_search_view_flipper)).check(matches(isDisplayed())); onNotesInSearch().check(matches(recyclerViewItemCount(29)));