mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 23:08:25 +08:00
FIX: relative picker was being reset on change (#26766)
A change in relative picker was causing a serie of events which ultimately would cause the whole list of time options to be reset and re-rendered which would cause a new instance of the picker to be created, causing a reset. The fix is using id in the each loop to help ember identify that it doesn’t have to re-render a specific component.
This commit is contained in:
@ -39,6 +39,16 @@ module PageObjects
|
||||
has_css?(".bookmark-options-panel")
|
||||
end
|
||||
|
||||
def select_relative_time_duration(duration)
|
||||
find("#bookmark-relative-time-picker").fill_in(with: duration)
|
||||
end
|
||||
|
||||
def select_relative_time_interval(interval)
|
||||
select_kit = PageObjects::Components::SelectKit.new(".relative-time-intervals")
|
||||
select_kit.expand
|
||||
select_kit.select_row_by_value(interval)
|
||||
end
|
||||
|
||||
def select_auto_delete_preference(preference)
|
||||
select_kit = PageObjects::Components::SelectKit.new("#bookmark-auto-delete-preference")
|
||||
select_kit.expand
|
||||
|
Reference in New Issue
Block a user