Skip to content

Commit

Permalink
Update test to new behavior
Browse files Browse the repository at this point in the history
If the dates have not changed, the date picker is not reinitialized and
its dates are not set again. So switching "Working-days only" checkbox
no longer shows the current date again and it's not needed for the test
to wait for the current date to be displayed and switch back to the
correct date.
  • Loading branch information
cbliard committed Feb 7, 2025
1 parent 796d3dc commit f8f2f71
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,7 @@

datepicker.toggle_working_days_only
datepicker.expect_working_days_only false
# Toggling non-working days reinitializes the displayed flatpickr, which
# shows the current date again. We need to wait for it to be reinitialized
# before showing another date. Ideally the flatpickr should not be
# reinitialized if it does not need to (dates not changed for instance).
datepicker.expect_visible_day Date.current

datepicker.show_date "2024-02-05"
datepicker.expect_disabled Date.parse("2024-02-05")
datepicker.expect_disabled Date.parse("2024-02-04")
datepicker.expect_disabled Date.parse("2024-02-03")
Expand Down

0 comments on commit f8f2f71

Please sign in to comment.