diff --git a/config/locales/en/activerecord.yml b/config/locales/en/activerecord.yml index 62aafbea2..c9e4cd7c6 100644 --- a/config/locales/en/activerecord.yml +++ b/config/locales/en/activerecord.yml @@ -283,8 +283,8 @@ en: phone_number: "Phone number" public_activity: "Keep my list of activities public" public_interests: "Keep the elements I follow public" - recommended_debates: "Show debates recommendations" - recommended_proposals: "Show proposals recommendations" + recommended_debates: "Recommend debates to me" + recommended_proposals: "Recommend proposals to me" redeemable_code: "Verification code received via email" direct_message: title: "Title" diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 7fa2d102d..215ea9020 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -102,7 +102,7 @@ en: recommendations: without_results: There are no debates related to your interests without_interests: Follow proposals so we can give you recommendations - disable: "Debates recommendations will stop showing if you dismiss them. You can enable them again in 'My account' page" + disable: "Recommendations for debates will stop showing if you dismiss them. You can enable them again in 'My account' page" actions: success: "Recommendations for debates are now disabled for this account" error: "An error has occured. Please go to 'My account' page to manually disable recommendations for debates" @@ -347,7 +347,7 @@ en: recommendations: without_results: There are not proposals related to your interests without_interests: Follow proposals so we can give you recommendations - disable: "Proposals recommendations will stop showing if you dismiss them. You can enable them again in 'My account' page" + disable: "Recommendations for proposals will stop showing if you dismiss them. You can enable them again in 'My account' page" actions: success: "Recommendations for proposals are now disabled for this account" error: "An error has occured. Please go to 'My account' page to manually disable recommendations for proposals" diff --git a/spec/system/account_spec.rb b/spec/system/account_spec.rb index 63334d348..f1d0ea301 100644 --- a/spec/system/account_spec.rb +++ b/spec/system/account_spec.rb @@ -199,31 +199,27 @@ describe "Account" do scenario "are enabled by default" do visit account_path - expect(page).to have_content("Recommendations") - expect(page).to have_content("Show debates recommendations") - expect(page).to have_content("Show proposals recommendations") - expect(find("#account_recommended_debates")).to be_checked - expect(find("#account_recommended_proposals")).to be_checked + expect(page).to have_content "Recommendations" + expect(page).to have_field "Recommend debates to me", checked: true + expect(page).to have_field "Recommend proposals to me", checked: true end scenario "can be disabled through 'My account' page" do visit account_path - expect(page).to have_content("Recommendations") - expect(page).to have_content("Show debates recommendations") - expect(page).to have_content("Show proposals recommendations") - expect(find("#account_recommended_debates")).to be_checked - expect(find("#account_recommended_proposals")).to be_checked + expect(page).to have_content "Recommendations" + expect(page).to have_field "Recommend debates to me", checked: true + expect(page).to have_field "Recommend proposals to me", checked: true - uncheck "account_recommended_debates" - uncheck "account_recommended_proposals" + uncheck "Recommend debates to me" + uncheck "Recommend proposals to me" click_button "Save changes" expect(page).to have_content "Changes saved" - expect(find("#account_recommended_debates")).not_to be_checked - expect(find("#account_recommended_proposals")).not_to be_checked + expect(page).to have_field "Recommend debates to me", checked: false + expect(page).to have_field "Recommend proposals to me", checked: false visit debates_path