update test to match new datepicker

And use the method choose_today_from_datepicker
This commit is contained in:
Jean-Baptiste Bellet
2021-01-21 15:19:45 +01:00
parent 11d62eb331
commit e3db4e2e86
2 changed files with 3 additions and 5 deletions

View File

@@ -195,9 +195,7 @@ feature 'Subscriptions' do
expect(page).to have_content 'can\'t be blank', count: 1
expect(page).to have_content 'Oops! Please fill in all of the required fields...'
find_field('begins_at').click
within(".ui-datepicker-calendar") do
find('.ui-datepicker-today').click
end
choose_today_from_datepicker
click_button('Next')
expect(page).to have_content 'BILLING ADDRESS'

View File

@@ -3,8 +3,8 @@
module Features
module DatepickerHelper
def choose_today_from_datepicker
within(".ui-datepicker-calendar") do
find(".ui-datepicker-today").click
within(".flatpickr-calendar.open") do
find('.shortcut-buttons-flatpickr-button').click
end
end