diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index 47aae4544..36b80fc2f 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -718,7 +718,7 @@ es: debates: title: Debates recomendados proposals: - title: Propuestas recomendados + title: Propuestas recomendadas budget_investments: title: Presupuestos recomendados verification: diff --git a/spec/features/admin_spec.rb b/spec/features/admin_spec.rb index 9ea2c2390..f2374f183 100644 --- a/spec/features/admin_spec.rb +++ b/spec/features/admin_spec.rb @@ -12,7 +12,7 @@ feature 'Admin' do visit admin_root_path expect(current_path).not_to eq(admin_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -22,7 +22,7 @@ feature 'Admin' do visit admin_root_path expect(current_path).not_to eq(admin_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -32,7 +32,7 @@ feature 'Admin' do visit admin_root_path expect(current_path).not_to eq(admin_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -42,7 +42,7 @@ feature 'Admin' do visit admin_root_path expect(current_path).not_to eq(admin_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -52,7 +52,7 @@ feature 'Admin' do visit admin_root_path expect(current_path).not_to eq(admin_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end diff --git a/spec/features/debates_spec.rb b/spec/features/debates_spec.rb index 749c7a373..09970f3a4 100644 --- a/spec/features/debates_spec.rb +++ b/spec/features/debates_spec.rb @@ -219,7 +219,7 @@ feature 'Debates' do visit edit_debate_path(debate) expect(current_path).not_to eq(edit_debate_path(debate)) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to carry out the action 'edit' on debate." end @@ -234,7 +234,7 @@ feature 'Debates' do visit edit_debate_path(debate) expect(current_path).not_to eq(edit_debate_path(debate)) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content 'You do not have permission to' end diff --git a/spec/features/moderation_spec.rb b/spec/features/moderation_spec.rb index fedcb105d..ad4042425 100644 --- a/spec/features/moderation_spec.rb +++ b/spec/features/moderation_spec.rb @@ -11,7 +11,7 @@ feature 'Moderation' do visit moderation_root_path expect(current_path).not_to eq(moderation_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -25,7 +25,7 @@ feature 'Moderation' do visit moderation_root_path expect(current_path).not_to eq(moderation_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -39,7 +39,7 @@ feature 'Moderation' do visit moderation_root_path expect(current_path).not_to eq(moderation_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -53,7 +53,7 @@ feature 'Moderation' do visit moderation_root_path expect(current_path).not_to eq(moderation_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end diff --git a/spec/features/notifications_spec.rb b/spec/features/notifications_spec.rb index 7b044e18a..9925b0d56 100644 --- a/spec/features/notifications_spec.rb +++ b/spec/features/notifications_spec.rb @@ -15,16 +15,7 @@ feature "Notifications" do let(:legislation_annotation) { create(:legislation_annotation, author: author) } scenario "User commented on my debate", :js do - login_as user - visit debate_path debate - - fill_in "comment-body-debate_#{debate.id}", with: "I commented on your debate" - click_button "Publish comment" - within "#comments" do - expect(page).to have_content "I commented on your debate" - end - - logout + create(:notification, notifiable: debate, user: author) login_as author visit root_path @@ -37,17 +28,7 @@ feature "Notifications" do end scenario "User commented on my legislation question", :js do - verified_user = create(:user, :level_two) - login_as verified_user - visit legislation_process_question_path legislation_question.process, legislation_question - - fill_in "comment-body-legislation_question_#{legislation_question.id}", with: "I answered your question" - click_button "Publish answer" - within "#comments" do - expect(page).to have_content "I answered your question" - end - - logout + create(:notification, notifiable: legislation_question, user: administrator) login_as administrator visit root_path @@ -82,6 +63,7 @@ feature "Notifications" do logout login_as author visit root_path + visit root_path find(".icon-notification").click @@ -107,8 +89,10 @@ feature "Notifications" do end logout + login_as author visit root_path + visit root_path find(".icon-notification").click @@ -137,6 +121,7 @@ feature "Notifications" do login_as author visit root_path + visit root_path find(".icon-notification").click @@ -208,6 +193,7 @@ feature "Notifications" do logout login_as user1 visit root_path + visit root_path find(".icon-notification").click @@ -219,6 +205,7 @@ feature "Notifications" do logout login_as user2 visit root_path + visit root_path find(".icon-notification").click @@ -230,6 +217,7 @@ feature "Notifications" do logout login_as user3 visit root_path + visit root_path find(".icon-no-notification").click diff --git a/spec/features/officing_spec.rb b/spec/features/officing_spec.rb index d4cb416a1..aff3eac4e 100644 --- a/spec/features/officing_spec.rb +++ b/spec/features/officing_spec.rb @@ -11,7 +11,7 @@ feature 'Poll Officing' do visit officing_root_path expect(current_path).not_to eq(officing_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -24,7 +24,7 @@ feature 'Poll Officing' do visit officing_root_path expect(current_path).not_to eq(officing_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -37,7 +37,7 @@ feature 'Poll Officing' do visit officing_root_path expect(current_path).not_to eq(officing_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -50,7 +50,7 @@ feature 'Poll Officing' do visit officing_root_path expect(current_path).not_to eq(officing_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end diff --git a/spec/features/proposal_notifications_spec.rb b/spec/features/proposal_notifications_spec.rb index 4756a1903..1e93f7e13 100644 --- a/spec/features/proposal_notifications_spec.rb +++ b/spec/features/proposal_notifications_spec.rb @@ -189,7 +189,7 @@ feature 'Proposal Notifications' do login_as(user) visit new_proposal_notification_path(proposal_id: proposal.id) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content("You do not have permission to carry out the action") end diff --git a/spec/features/proposals_spec.rb b/spec/features/proposals_spec.rb index 1cb39a579..e6e46c011 100644 --- a/spec/features/proposals_spec.rb +++ b/spec/features/proposals_spec.rb @@ -522,7 +522,7 @@ feature 'Proposals' do visit edit_proposal_path(proposal) expect(current_path).not_to eq(edit_proposal_path(proposal)) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content 'You do not have permission' end @@ -537,7 +537,7 @@ feature 'Proposals' do visit edit_proposal_path(proposal) expect(current_path).not_to eq(edit_proposal_path(proposal)) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content 'You do not have permission' Setting["max_votes_for_proposal_edit"] = 1000 end diff --git a/spec/features/valuation_spec.rb b/spec/features/valuation_spec.rb index 5b6cc961c..9e74d9341 100644 --- a/spec/features/valuation_spec.rb +++ b/spec/features/valuation_spec.rb @@ -21,7 +21,7 @@ feature 'Valuation' do visit valuation_root_path expect(current_path).not_to eq(valuation_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -34,7 +34,7 @@ feature 'Valuation' do visit valuation_root_path expect(current_path).not_to eq(valuation_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -47,7 +47,7 @@ feature 'Valuation' do visit valuation_root_path expect(current_path).not_to eq(valuation_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end @@ -60,7 +60,7 @@ feature 'Valuation' do visit valuation_root_path expect(current_path).not_to eq(valuation_root_path) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) expect(page).to have_content "You do not have permission to access this page" end diff --git a/spec/features/welcome_spec.rb b/spec/features/welcome_spec.rb index ce06befcc..245a9923e 100644 --- a/spec/features/welcome_spec.rb +++ b/spec/features/welcome_spec.rb @@ -33,7 +33,7 @@ feature "Welcome screen" do login_through_form_as(user) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) end scenario 'is not shown to organizations' do @@ -41,7 +41,7 @@ feature "Welcome screen" do login_through_form_as(organization.user) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) end scenario 'it is not shown to level-2 users' do @@ -49,7 +49,7 @@ feature "Welcome screen" do login_through_form_as(user) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) end scenario 'it is not shown to level-3 users' do @@ -57,7 +57,7 @@ feature "Welcome screen" do login_through_form_as(user) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) end scenario 'is not shown to administrators' do @@ -65,7 +65,7 @@ feature "Welcome screen" do login_through_form_as(administrator.user) - expect(current_path).to eq(proposals_path) + expect(current_path).to eq(root_path) end end diff --git a/spec/views/welcome/index.html.erb_spec.rb b/spec/views/welcome/index.html.erb_spec.rb index 24b461ad6..1f7d34966 100644 --- a/spec/views/welcome/index.html.erb_spec.rb +++ b/spec/views/welcome/index.html.erb_spec.rb @@ -10,7 +10,8 @@ RSpec.describe "welcome/index" do recommendeds: [debate], image_field: nil, image_version: nil, - image_default: "https://dummyimage.com/600x400/000/fff"} + image_default: "https://dummyimage.com/600x400/000/fff", + klass: ""} within 'li[data-slide="0"] .card' do expect(page).to have_selector("img") @@ -26,7 +27,8 @@ RSpec.describe "welcome/index" do recommendeds: [debate], image_field: nil, image_version: nil, - image_default: nil} + image_default: nil, + klass: ""} within 'li[data-slide="0"] .card' do expect(page).not_to have_selector("img")