Module: Capybara::DatepickerTimeFill
- Defined in:
- lib/decidim/dev/test/rspec_support/datepicker_time_fill.rb
Instance Method Summary collapse
-
#fill_in_timepicker(locator = nil, with:, currently_with: nil, fill_options: {}, **find_options) ⇒ Object
fill datepicker field correctly.
Instance Method Details
#fill_in_timepicker(locator = nil, with:, currently_with: nil, fill_options: {}, **find_options) ⇒ Object
fill datepicker field correctly
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/decidim/dev/test/rspec_support/datepicker_time_fill.rb', line 7 def fill_in_timepicker(locator = nil, with:, currently_with: nil, fill_options: {}, **) [:with] = currently_with if currently_with [:allow_self] = true if locator.nil? with.chars.each do |character| if character == ":" find(:fillable_field, locator, **).send_keys([:alt, ":"], **) else find(:fillable_field, locator, **).send_keys(character, **) end end end |