Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
kizitonwose committed Aug 3, 2024
1 parent fbc3fb2 commit b1d6c4f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,12 @@ class CalendarViewTest {

@Test
fun findVisibleDaysAndMonthsWorksOnVerticalOrientation() {
openExampleAt(1)
openExampleAt(7)

val calendarView = getView<CalendarView>(R.id.exTwoCalendar)
val calendarView = getView<CalendarView>(R.id.exEightCalendar)

runOnMain {
calendarView.orientation = RecyclerView.VERTICAL
// Scroll to a random date
calendarView.scrollToDate(LocalDate.now().plusDays(120))
}
Expand All @@ -266,11 +267,12 @@ class CalendarViewTest {

@Test
fun findVisibleDaysAndMonthsWorksOnHorizontalOrientation() {
openExampleAt(0)
openExampleAt(7)

val calendarView = getView<CalendarView>(R.id.exOneCalendar)
val calendarView = getView<CalendarView>(R.id.exEightCalendar)

runOnMain {
calendarView.orientation = RecyclerView.HORIZONTAL
// Scroll to a random date
calendarView.scrollToDate(LocalDate.now().plusDays(120))
}
Expand Down

0 comments on commit b1d6c4f

Please sign in to comment.