diff --git a/app/src/androidTest/java/com/nononsenseapps/notepad/espresso_tests/EspressoHelper.java b/app/src/androidTest/java/com/nononsenseapps/notepad/espresso_tests/EspressoHelper.java index 55c355fa..ead7ff95 100644 --- a/app/src/androidTest/java/com/nononsenseapps/notepad/espresso_tests/EspressoHelper.java +++ b/app/src/androidTest/java/com/nononsenseapps/notepad/espresso_tests/EspressoHelper.java @@ -33,14 +33,13 @@ public class EspressoHelper { /** - * Wait for 500ms to work around timing issues on slow emulators. Every time - * this function is called was to solve issues with flaky tests on github runners. - * Keep it: sometime tests need it, sometimes they don't, but you can't know. - * Ideally, it should go after every call to {@link ViewInteraction#perform} + * Wait for 350ms to work around timing issues on slow emulators. It's called to solve issues + * with flaky tests on github runners. Sometime tests need it, sometimes they don't, + * but you can't know. It should go after every call to {@link ViewInteraction#perform} */ public static void waitUi() { InstrumentationRegistry.getInstrumentation().waitForIdleSync(); - SystemClock.sleep(500); + SystemClock.sleep(400); } /** @@ -86,6 +85,9 @@ public static void createTaskList(String taskListName) { EspressoHelper.hideShowCaseViewIfShown(); onView(withId(R.id.drawer_menu_createlist)).check(matches(isDisplayed())); + // sometimes the automator will hold the button too long. This will show the tooltip, + // and the test will fail because the button did not get the click to show the dialog. + // It's a matter of luck: retry the test and it will work onView(withId(R.id.drawer_menu_createlist)).perform(click()); waitUi(); // the popup may need time to load diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 564248a4..1dc83b5f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -134,7 +134,7 @@ Enable synchronization Enables synchronization features and allows to choose a sync source. Backups are not affected Changelog (online) - Canceled: the note is locked + Cancelled: the note is locked Order notes by: Show items as: Version: %s