mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 03:37:15 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user