diff --git a/spec/support/common_actions.rb b/spec/support/common_actions.rb index 954047d9a..0b94fdfa1 100644 --- a/spec/support/common_actions.rb +++ b/spec/support/common_actions.rb @@ -36,9 +36,9 @@ module CommonActions fill_in "Proposal title", with: "Help refugees" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "This is very important because..." - fill_in "proposal_video_url", with: "https://www.youtube.com/watch?v=yPQfcG-eimk" - fill_in "proposal_responsible_name", with: "Isabel Garcia" - check "proposal_terms_of_service" + fill_in "External video URL", with: "https://www.youtube.com/watch?v=yPQfcG-eimk" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + check "I agree to the Privacy Policy and the Terms and conditions of use" end def set_officing_booth(booth = nil) diff --git a/spec/system/management/proposals_spec.rb b/spec/system/management/proposals_spec.rb index 618251822..f9dd4f428 100644 --- a/spec/system/management/proposals_spec.rb +++ b/spec/system/management/proposals_spec.rb @@ -19,8 +19,8 @@ describe "Proposals" do fill_in "Proposal title", with: "Help refugees" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "This is very important because..." - fill_in "proposal_video_url", with: "https://www.youtube.com/watch?v=yRYFKcMa_Ek" - check "proposal_terms_of_service" + fill_in "External video URL", with: "https://www.youtube.com/watch?v=yRYFKcMa_Ek" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" diff --git a/spec/system/proposals_spec.rb b/spec/system/proposals_spec.rb index 6482faac2..e9fc118ab 100644 --- a/spec/system/proposals_spec.rb +++ b/spec/system/proposals_spec.rb @@ -364,10 +364,10 @@ describe "Proposals" do fill_in "Proposal title", with: "Help refugees" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "This is very important because..." - fill_in "proposal_video_url", with: "https://www.youtube.com/watch?v=yPQfcG-eimk" - fill_in "proposal_responsible_name", with: "Isabel Garcia" - fill_in "proposal_tag_list", with: "Refugees, Solidarity" - check "proposal_terms_of_service" + fill_in "External video URL", with: "https://www.youtube.com/watch?v=yPQfcG-eimk" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + fill_in "Tags", with: "Refugees, Solidarity" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" @@ -396,11 +396,11 @@ describe "Proposals" do visit new_proposal_path fill_in "Proposal title", with: "I am a bot" - fill_in "proposal_subtitle", with: "This is the honeypot field" + fill_in "If you are human, ignore this field", with: "This is the honeypot field" fill_in "Proposal summary", with: "This is the summary" fill_in "Proposal text", with: "This is the description" - fill_in "proposal_responsible_name", with: "Some other robot" - check "proposal_terms_of_service" + fill_in "Full name of the person submitting the proposal", with: "Some other robot" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" @@ -419,8 +419,8 @@ describe "Proposals" do fill_in "Proposal title", with: "I am a bot" fill_in "Proposal summary", with: "This is the summary" fill_in_ckeditor "Proposal text", with: "This is the description" - fill_in "proposal_responsible_name", with: "Some other robot" - check "proposal_terms_of_service" + fill_in "Full name of the person submitting the proposal", with: "Some other robot" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" @@ -437,8 +437,8 @@ describe "Proposals" do fill_in "Proposal title", with: "Help refugees" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "This is very important because..." - fill_in "proposal_responsible_name", with: "Isabel Garcia" - check "proposal_terms_of_service" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" @@ -454,12 +454,13 @@ describe "Proposals" do login_as(author) visit new_proposal_path - expect(page).not_to have_selector("#proposal_responsible_name") + + expect(page).not_to have_field "Full name of the person submitting the proposal" fill_in "Proposal title", with: "Help refugees" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "This is very important because..." - check "proposal_terms_of_service" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" expect(page).to have_content "Proposal created successfully." @@ -487,8 +488,8 @@ describe "Proposals" do fill_in "Proposal title", with: "Testing an attack" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in "Proposal text", with: "
This is
" - fill_in "proposal_responsible_name", with: "Isabel Garcia" - check "proposal_terms_of_service" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" @@ -510,8 +511,8 @@ describe "Proposals" do fill_in "Proposal title", with: "Testing auto link" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "This is a link www.example.org" - fill_in "proposal_responsible_name", with: "Isabel Garcia" - check "proposal_terms_of_service" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" @@ -532,8 +533,8 @@ describe "Proposals" do fill_in "Proposal title", with: "Testing auto link" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in "Proposal text", with: js_injection_string - fill_in "proposal_responsible_name", with: "Isabel Garcia" - check "proposal_terms_of_service" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" @@ -588,9 +589,9 @@ describe "Proposals" do fill_in "Proposal title", with: "Help refugees" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "This is very important because..." - fill_in "proposal_video_url", with: "https://www.youtube.com/watch?v=yPQfcG-eimk" - fill_in "proposal_responsible_name", with: "Isabel Garcia" - check "proposal_terms_of_service" + fill_in "External video URL", with: "https://www.youtube.com/watch?v=yPQfcG-eimk" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + check "I agree to the Privacy Policy and the Terms and conditions of use" select("California", from: "proposal_geozone_id") click_button "Create proposal" @@ -755,7 +756,7 @@ describe "Proposals" do fill_in "Proposal title", with: "End child poverty" fill_in "Proposal summary", with: "Basically..." fill_in_ckeditor "Proposal text", with: "Let's do something to end child poverty" - fill_in "proposal_responsible_name", with: "Isabel Garcia" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" click_button "Save changes" @@ -1413,7 +1414,7 @@ describe "Proposals" do login_as(create(:user)) visit new_proposal_path fill_in "Proposal title", with: "search" - check "proposal_terms_of_service" + check "I agree to the Privacy Policy and the Terms and conditions of use" within("div.js-suggest") do expect(page).to have_content "You are seeing 5 of 6 proposals containing the term 'search'" @@ -1427,7 +1428,7 @@ describe "Proposals" do login_as(create(:user)) visit new_proposal_path fill_in "Proposal title", with: "debate" - check "proposal_terms_of_service" + check "I agree to the Privacy Policy and the Terms and conditions of use" within("div.js-suggest") do expect(page).not_to have_content "You are seeing" @@ -1617,9 +1618,9 @@ describe "Successful proposals" do fill_in "Proposal title", with: "Help refugees" fill_in "Proposal summary", with: "In summary what we want is..." fill_in_ckeditor "Proposal text", with: "This is very important because..." - fill_in "proposal_video_url", with: "https://www.youtube.com/watch?v=yPQfcG-eimk" - fill_in "proposal_tag_list", with: "Refugees, Solidarity" - check "proposal_terms_of_service" + fill_in "External video URL", with: "https://www.youtube.com/watch?v=yPQfcG-eimk" + fill_in "Tags", with: "Refugees, Solidarity" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" @@ -1640,9 +1641,9 @@ describe "Successful proposals" do visit new_proposal_path fill_in "Proposal title", with: "A title for a proposal related with SDG related content" fill_in "Proposal summary", with: "In summary, what we want is..." - fill_in "proposal_responsible_name", with: "Isabel Garcia" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" click_sdg_goal(1) - check "proposal_terms_of_service" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" diff --git a/spec/system/tags/proposals_spec.rb b/spec/system/tags/proposals_spec.rb index f7f7a5e44..fd039d740 100644 --- a/spec/system/tags/proposals_spec.rb +++ b/spec/system/tags/proposals_spec.rb @@ -67,9 +67,9 @@ describe "Tags" do fill_in "Proposal title", with: "Help refugees" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "This is very important because..." - fill_in "proposal_responsible_name", with: "Isabel Garcia" - fill_in "proposal_tag_list", with: "Economía, Hacienda" - check "proposal_terms_of_service" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + fill_in "Tags", with: "Economía, Hacienda" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create proposal" @@ -91,9 +91,9 @@ describe "Tags" do fill_in "Proposal title", with: "Help refugees" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "A description with enough characters" - fill_in "proposal_video_url", with: "https://www.youtube.com/watch?v=Ae6gQmhaMn4" - fill_in "proposal_responsible_name", with: "Isabel Garcia" - check "proposal_terms_of_service" + fill_in "External video URL", with: "https://www.youtube.com/watch?v=Ae6gQmhaMn4" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + check "I agree to the Privacy Policy and the Terms and conditions of use" find(".js-add-tag-link", text: "Education").click click_button "Create proposal" @@ -115,9 +115,9 @@ describe "Tags" do visit new_proposal_path fill_in "Proposal title", with: "Title" fill_in_ckeditor "Proposal text", with: "Description" - check "proposal_terms_of_service" + check "I agree to the Privacy Policy and the Terms and conditions of use" - fill_in "proposal_tag_list", with: "Impuestos, Economía, Hacienda, Sanidad, Educación, Política, Igualdad" + fill_in "Tags", with: "Impuestos, Economía, Hacienda, Sanidad, Educación, Política, Igualdad" click_button "Create proposal" @@ -134,10 +134,10 @@ describe "Tags" do fill_in "Proposal title", with: "A test of dangerous strings" fill_in "Proposal summary", with: "In summary, what we want is..." fill_in_ckeditor "Proposal text", with: "A description suitable for this test" - fill_in "proposal_responsible_name", with: "Isabel Garcia" - check "proposal_terms_of_service" + fill_in "Full name of the person submitting the proposal", with: "Isabel Garcia" + check "I agree to the Privacy Policy and the Terms and conditions of use" - fill_in "proposal_tag_list", with: "user_id=1, &a=3, " + fill_in "Tags", with: "user_id=1, &a=3, " click_button "Create proposal" @@ -159,7 +159,7 @@ describe "Tags" do expect(page).to have_selector("input[value='Economía']") - fill_in "proposal_tag_list", with: "Economía, Hacienda" + fill_in "Tags", with: "Economía, Hacienda" click_button "Save changes" expect(page).to have_content "Proposal updated successfully." @@ -175,7 +175,7 @@ describe "Tags" do login_as(proposal.author) visit edit_proposal_path(proposal) - fill_in "proposal_tag_list", with: "" + fill_in "Tags", with: "" click_button "Save changes" expect(page).to have_content "Proposal updated successfully."