discourse/spec/system/user_page/staff_info_spec.rb
Martin Brennan e91d8feab3
Revert "FEATURE: Count only approved flagged posts in user pages (#22799)" (#23962)
This reverts commit 5f0bc4557f.

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.
2023-10-18 11:38:17 +10:00

21 lines
709 B
Ruby

# frozen_string_literal: true
describe "Viewing user staff info as an admin", type: :system do
fab!(:user) { Fabricate(:user) }
fab!(:admin) { Fabricate(:admin) }
let(:user_page) { PageObjects::Pages::User.new }
before { sign_in(admin) }
context "for warnings" do
fab!(:topic) { Fabricate(:private_message_topic, user: admin, recipient: user) }
fab!(:user_warning) { UserWarning.create!(user: user, created_by: admin, topic: topic) }
it "should display the right link to user's warnings with the right count in text" do
user_page.visit(user).click_staff_info_warnings_link(user, warnings_count: 1)
expect(user_page).to have_warning_messages_path(user)
end
end
end