Module: Capybara::PollingOfficersPicker

Includes:
DataPicker
Defined in:
decidim-elections/lib/decidim/votings/test/capybara_polling_officers_picker.rb

Instance Method Summary collapse

Methods included from DataPicker

#data_picker_choose_value, #data_picker_close, #data_picker_pick_current, #find_data_picker, #select_data_picker

Instance Method Details

#polling_officers_pick(polling_officers_picker, polling_officers) ⇒ Object


31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'decidim-elections/lib/decidim/votings/test/capybara_polling_officers_picker.rb', line 31

def polling_officers_pick(polling_officers_picker, polling_officers)
  data_picker = polling_officers_picker.data_picker

  expect(data_picker).to have_selector(".picker-prompt")
  data_picker.find(".picker-prompt").click

  polling_officers.each do |polling_officer|
    data_picker_choose_value(polling_officer.id)
  end
  data_picker_close

  expect(polling_officers_picker).to have_polling_officers_picked(polling_officers)
end