Revert "FEATURE: Count only approved flagged posts in user pages (#22799)" (#23962)

This reverts commit 5f0bc4557fb04928a8d38cba410d316a76f1bf8c.

Through extensive internal discussion we have decided to revert
this change, as it significantly impacted moderation flow for
some Discourse site moderators, especially around "something else"
flags. We need to re-approach how flags are counted holistically,
so to that end this change is being reverted.
This commit is contained in:
Martin Brennan
2023-10-18 11:38:17 +10:00
committed by GitHub
parent 30778e5fa4
commit e91d8feab3
6 changed files with 15 additions and 102 deletions

View File

@ -17,43 +17,4 @@ describe "Viewing user staff info as an admin", type: :system do
expect(user_page).to have_warning_messages_path(user)
end
end
context "for flagged posts" do
before do
%i[disagree ignore delete_and_ignore].each do |review_action|
PostActionCreator
.off_topic(admin, Fabricate(:post, user: user))
.reviewable
.perform(admin, review_action)
end
end
context "when there are no approved flagged posts" do
it "should not display a flagged-posts staff counter" do
user_page.visit(user)
expect(user_page).to have_no_staff_info_flagged_posts_counter
end
end
context "when there are approved flagged posts" do
before do
2.times do
PostActionCreator
.off_topic(admin, Fabricate(:post, user: user))
.reviewable
.perform(admin, :agree_and_keep)
end
end
it "should display a flagged-posts staff counter with the right count and link to user's flagged posts" do
user_page.visit(user)
expect(user_page).to have_staff_info_flagged_posts_count(count: 2)
user_page.staff_info_flagged_posts_counter.click
expect(user_page).to have_reviewable_flagged_posts_path(user)
end
end
end
end