lib/decidim/proposals/test/capybara_proposals_picker.rb in decidim-proposals-0.24.3 vs lib/decidim/proposals/test/capybara_proposals_picker.rb in decidim-proposals-0.25.0.rc1

- old
+ new

@@ -39,9 +39,19 @@ end data_picker_close expect(proposals_picker).to have_proposals_picked(proposals) end + + def proposals_remove(proposals_picker, proposals) + data_picker = proposals_picker.data_picker + + proposals.each do |proposal| + data_picker.find("a", text: proposal.title["en"]).find("span").click + end + + expect(proposals_picker).to have_proposals_not_picked(proposals) + end end end RSpec.configure do |config| config.include Capybara::ProposalsPicker, type: :system