mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
update test to match new datepicker
And use the method choose_today_from_datepicker
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user