diff --git a/app/src/androidTest/java/com/faltenreich/diaguard/test/espresso/DateTimeUtils.java b/app/src/androidTest/java/com/faltenreich/diaguard/test/espresso/DateTimeUtils.java index 14528f136..ef7570d92 100644 --- a/app/src/androidTest/java/com/faltenreich/diaguard/test/espresso/DateTimeUtils.java +++ b/app/src/androidTest/java/com/faltenreich/diaguard/test/espresso/DateTimeUtils.java @@ -19,7 +19,7 @@ public static void setDate(LocalDate date){ Espresso.onView(ViewMatchers.withTagValue((Matchers.is("TOGGLE_BUTTON_TAG")))) .perform(ViewActions.click()); Espresso.onView(ViewMatchers.withId(com.google.android.material.R.id.mtrl_picker_text_input_date)) - .perform(TextInputLayoutActions.replaceText(DateTimeFormat.forPattern("M/d/yy").print(date))); + .perform(TextInputLayoutActions.replaceText(DateTimeFormat.shortDate().print(date))); Espresso.onView(ViewMatchers.withId(com.google.android.material.R.id.confirm_button)) .perform(ViewActions.click()); } @@ -28,9 +28,9 @@ public static void setDateRange(LocalDate start, LocalDate end){ Espresso.onView(ViewMatchers.withTagValue((Matchers.is("TOGGLE_BUTTON_TAG")))) .perform(ViewActions.click()); Espresso.onView(ViewMatchers.withId(com.google.android.material.R.id.mtrl_picker_text_input_range_start)) - .perform(TextInputLayoutActions.replaceText(DateTimeFormat.forPattern("M/d/yy").print(start))); + .perform(TextInputLayoutActions.replaceText(DateTimeFormat.shortDate().print(start))); Espresso.onView(ViewMatchers.withId(com.google.android.material.R.id.mtrl_picker_text_input_range_end)) - .perform(TextInputLayoutActions.replaceText(DateTimeFormat.forPattern("M/d/yy").print(end))); + .perform(TextInputLayoutActions.replaceText(DateTimeFormat.shortDate().print(end))); Espresso.onView(ViewMatchers.withId(com.google.android.material.R.id.confirm_button)) .perform(ViewActions.click()); }