diff --git a/app/views/comments/_flag_as_inappropiate_actions.html.erb b/app/views/comments/_flag_as_inappropiate_actions.html.erb index 0b62715e3..07440f600 100644 --- a/app/views/comments/_flag_as_inappropiate_actions.html.erb +++ b/app/views/comments/_flag_as_inappropiate_actions.html.erb @@ -5,7 +5,7 @@
<% end %> @@ -17,7 +17,7 @@ <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 55e06af4e..98ac387fc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -134,7 +134,7 @@ en: shared: tags_cloud: tags: Topics - flag_as_inappropiate: Flag as inappropiate + flag_as_inappropiate: Flag as inappropriate undo_flag_as_inappropiate: Undo flag collective: Collective mailer: diff --git a/spec/features/comments_spec.rb b/spec/features/comments_spec.rb index 4ed16d915..b1b09a777 100644 --- a/spec/features/comments_spec.rb +++ b/spec/features/comments_spec.rb @@ -133,7 +133,7 @@ feature 'Comments' do expect(page).to have_css(".comment.comment.comment.comment.comment.comment.comment.comment") end - scenario "Flagging as inappropiate", :js do + scenario "Flagging as inappropriate", :js do user = create(:user) debate = create(:debate) comment = create(:comment, commentable: debate) @@ -142,15 +142,15 @@ feature 'Comments' do visit debate_path(debate) within "#comment_#{comment.id}" do - expect(page).to_not have_link "Undo flag as inappropiate" - click_on 'Flag as inappropiate' - expect(page).to have_link "Undo flag as inappropiate" + expect(page).to_not have_link "Undo flag as inappropriate" + click_on 'Flag as inappropriate' + expect(page).to have_link "Undo flag as inappropriate" end expect(InappropiateFlag.flagged?(user, comment)).to be end - scenario "Undoing flagging as inappropiate", :js do + scenario "Undoing flagging as inappropriate", :js do user = create(:user) debate = create(:debate) comment = create(:comment, commentable: debate) @@ -160,9 +160,9 @@ feature 'Comments' do visit debate_path(debate) within "#comment_#{comment.id}" do - expect(page).to_not have_link("Flag as inappropiate", exact: true) + expect(page).to_not have_link("Flag as inappropriate", exact: true) click_on 'Undo flag as inappropiate' - expect(page).to have_link("Flag as inappropiate", exact: true) + expect(page).to have_link("Flag as inappropriate", exact: true) end expect(InappropiateFlag.flagged?(user, comment)).to_not be diff --git a/spec/features/moderation/comments_spec.rb b/spec/features/moderation/comments_spec.rb index 5a4100f77..91ed0b083 100644 --- a/spec/features/moderation/comments_spec.rb +++ b/spec/features/moderation/comments_spec.rb @@ -104,43 +104,43 @@ feature 'Moderate Comments' do visit moderation_comments_path expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_comments_path(filter: 'all') expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_comments_path(filter: 'pending_review') expect(page).to have_link('All') expect(page).to_not have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') - visit moderation_comments_path(filter: 'reviewed') + visit moderation_comments_path(filter: 'archived') expect(page).to have_link('All') expect(page).to have_link('Pending') - expect(page).to_not have_link('Reviewed') + expect(page).to_not have_link('Archived') end scenario "Filtering comments" do create(:comment, :flagged_as_inappropiate, body: "Pending comment") create(:comment, :flagged_as_inappropiate, :hidden, body: "Hidden comment") - create(:comment, :flagged_as_inappropiate, :reviewed, body: "Reviewed comment") + create(:comment, :flagged_as_inappropiate, :reviewed, body: "Archived comment") visit moderation_comments_path(filter: 'all') expect(page).to have_content('Pending comment') expect(page).to_not have_content('Hidden comment') - expect(page).to have_content('Reviewed comment') + expect(page).to have_content('Archived comment') visit moderation_comments_path(filter: 'pending_review') expect(page).to have_content('Pending comment') expect(page).to_not have_content('Hidden comment') - expect(page).to_not have_content('Reviewed comment') + expect(page).to_not have_content('Archived comment') - visit moderation_comments_path(filter: 'reviewed') + visit moderation_comments_path(filter: 'archived') expect(page).to_not have_content('Pending comment') expect(page).to_not have_content('Hidden comment') - expect(page).to have_content('Reviewed comment') + expect(page).to have_content('Archived comment') end scenario "Reviewing links remember the pagination setting and the filter" do @@ -149,7 +149,7 @@ feature 'Moderate Comments' do visit moderation_comments_path(filter: 'pending_review', page: 2) - click_link('Mark as reviewed', match: :first) + click_link('Archive', match: :first) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys @@ -172,7 +172,7 @@ feature 'Moderate Comments' do expect(page).to have_content('spammy spam') expect(page).to have_content('1') expect(page).to have_link('Hide') - expect(page).to have_link('Mark as reviewed') + expect(page).to have_link('Archive') end end @@ -189,13 +189,13 @@ feature 'Moderate Comments' do scenario 'Marking the comment as reviewed' do within("#comment_#{@comment.id}") do - click_link('Mark as reviewed') + click_link('Archive') end expect(current_path).to eq(moderation_comments_path) within("#comment_#{@comment.id}") do - expect(page).to have_content('Reviewed') + expect(page).to have_content('Archived') end expect(@comment.reload).to be_reviewed diff --git a/spec/features/moderation/debates_spec.rb b/spec/features/moderation/debates_spec.rb index 1ea3101e0..9a2dfbd24 100644 --- a/spec/features/moderation/debates_spec.rb +++ b/spec/features/moderation/debates_spec.rb @@ -47,43 +47,43 @@ feature 'Moderate debates' do visit moderation_debates_path expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_debates_path(filter: 'all') expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_debates_path(filter: 'pending_review') expect(page).to have_link('All') expect(page).to_not have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') - visit moderation_debates_path(filter: 'reviewed') + visit moderation_debates_path(filter: 'archived') expect(page).to have_link('All') expect(page).to have_link('Pending') - expect(page).to_not have_link('Reviewed') + expect(page).to_not have_link('Archived') end scenario "Filtering debates" do create(:debate, :flagged_as_inappropiate, title: "Pending debate") create(:debate, :flagged_as_inappropiate, :hidden, title: "Hidden debate") - create(:debate, :flagged_as_inappropiate, :reviewed, title: "Reviewed debate") + create(:debate, :flagged_as_inappropiate, :reviewed, title: "Archived debate") visit moderation_debates_path(filter: 'all') expect(page).to have_content('Pending debate') expect(page).to_not have_content('Hidden debate') - expect(page).to have_content('Reviewed debate') + expect(page).to have_content('Archived debate') visit moderation_debates_path(filter: 'pending_review') expect(page).to have_content('Pending debate') expect(page).to_not have_content('Hidden debate') - expect(page).to_not have_content('Reviewed debate') + expect(page).to_not have_content('Archived debate') - visit moderation_debates_path(filter: 'reviewed') + visit moderation_debates_path(filter: 'archived') expect(page).to_not have_content('Pending debate') expect(page).to_not have_content('Hidden debate') - expect(page).to have_content('Reviewed debate') + expect(page).to have_content('Archived debate') end scenario "Reviewing links remember the pagination setting and the filter" do @@ -92,7 +92,7 @@ feature 'Moderate debates' do visit moderation_debates_path(filter: 'pending_review', page: 2) - click_link('Mark as reviewed', match: :first) + click_link('Archive', match: :first) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys @@ -114,7 +114,7 @@ feature 'Moderate debates' do expect(page).to have_content('buy buy buy') expect(page).to have_content('1') expect(page).to have_link('Hide') - expect(page).to have_link('Mark as reviewed') + expect(page).to have_link('Archive') end end @@ -131,13 +131,13 @@ feature 'Moderate debates' do scenario 'Marking the debate as reviewed' do within("#debate_#{@debate.id}") do - click_link('Mark as reviewed') + click_link('Archive') end expect(current_path).to eq(moderation_debates_path) within("#debate_#{@debate.id}") do - expect(page).to have_content('Reviewed') + expect(page).to have_content('Archived') end expect(@debate.reload).to be_reviewed