2023-08-10 23:05:44 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module PageObjects
|
|
|
|
module Components
|
|
|
|
class CalendarDateTimePicker < PageObjects::Components::Base
|
2024-05-01 21:36:46 -04:00
|
|
|
delegate :select_day, :select_year, to: :@pikaday_calendar
|
|
|
|
|
2023-08-10 23:05:44 -04:00
|
|
|
def initialize(context)
|
|
|
|
@context = context
|
2024-05-01 21:36:46 -04:00
|
|
|
@pikaday_calendar = PageObjects::Components::PikadayCalendar.new(context)
|
2023-08-10 23:05:44 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def component
|
|
|
|
find(@context)
|
|
|
|
end
|
|
|
|
|
|
|
|
def fill_time(time)
|
|
|
|
component.find(".time-picker").fill_in(with: time)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|