module Briar::Picker
Public Instance Methods
scroll_picker(dir, picker_id)
click to toggle source
# File lib/briar/picker/picker.rb, line 32 def scroll_picker(dir, picker_id) should_see_picker picker_id if dir.eql? 'down' picker_scroll_down_on_column 0 else picker_scroll_up_on_column 0 end step_pause end
selected_title_for_column(column)
click to toggle source
may only work on circular pickers - does not work on non-circular pickers because the visible titles do not follow the selected index
# File lib/briar/picker/picker.rb, line 26 def selected_title_for_column (column) selected_idx = picker_current_index_for_column column titles = visible_titles column titles[selected_idx] end
should_not_see_picker(picker_name)
click to toggle source
# File lib/briar/picker/picker.rb, line 13 def should_not_see_picker (picker_name) picker_exists = !query("pickerView marked:'#{picker_name}").empty? if picker_exists screenshot_and_raise "expected to _not_ see #{picker}" end end
should_see_picker(picker_name)
click to toggle source
# File lib/briar/picker/picker.rb, line 6 def should_see_picker (picker_name) picker_exists = !query("pickerView marked:'#{picker_name}").empty? unless picker_exists screenshot_and_raise "could not find picker named #{picker_name}" end end
visible_titles(column)
click to toggle source
# File lib/briar/picker/picker.rb, line 20 def visible_titles (column) query("pickerTableView index:#{column} child pickerTableViewWrapperCell", :wrappedView, :text).reverse end