Modify choose_today_from_datepicker to avoid possible ambiguous match with the find

This commit is contained in:
Thierry Jet
2021-10-26 20:46:12 +02:00
parent 41a7369b23
commit 8eff2716ed

View File

@@ -4,7 +4,8 @@ module Features
module DatepickerHelper
def choose_today_from_datepicker
within(".flatpickr-calendar.open") do
find('.shortcut-buttons-flatpickr-button').click
# Now that we have added the Close button, find the first button to avoid any ambiguous match
find('.shortcut-buttons-flatpickr-buttons > button:nth-child(1)').click
end
end