mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FEATURE: Hide Reviewable scores, change score filter to Priority
We found score hard to understand. It is still there behind the scenes for sorting purposes, but it is no longer shown. You can now filter by minimum priority (low, med, high) instead of score.
This commit is contained in:
@ -8,13 +8,15 @@ describe FlagQuery do
|
||||
fab!(:codinghorror) { Fabricate(:coding_horror) }
|
||||
|
||||
describe "flagged_topics" do
|
||||
it "respects `min_score_default_visibility`" do
|
||||
it "respects `reviewable_default_visibility`" do
|
||||
Reviewable.set_priorities(medium: 10.0)
|
||||
|
||||
admin = Fabricate(:admin)
|
||||
moderator = Fabricate(:moderator)
|
||||
|
||||
post = create_post
|
||||
|
||||
SiteSetting.min_score_default_visibility = 2.0
|
||||
SiteSetting.reviewable_default_visibility = 'low'
|
||||
PostActionCreator.spam(moderator, post)
|
||||
|
||||
result = FlagQuery.flagged_topics
|
||||
@ -23,7 +25,7 @@ describe FlagQuery do
|
||||
expect(ft.topic).to eq(post.topic)
|
||||
expect(ft.flag_counts).to eq(PostActionType.types[:spam] => 1)
|
||||
|
||||
SiteSetting.min_score_default_visibility = 10.0
|
||||
SiteSetting.reviewable_default_visibility = 'medium'
|
||||
|
||||
result = FlagQuery.flagged_topics
|
||||
expect(result[:flagged_topics]).to be_blank
|
||||
@ -130,14 +132,16 @@ describe FlagQuery do
|
||||
expect(posts.count).to eq(1)
|
||||
end
|
||||
|
||||
it "respects `min_score_default_visibility`" do
|
||||
it "respects `reviewable_default_visibility`" do
|
||||
Reviewable.set_priorities(medium: 3.0)
|
||||
SiteSetting.reviewable_default_visibility = 'medium'
|
||||
|
||||
admin = Fabricate(:admin)
|
||||
flagger = Fabricate(:user)
|
||||
|
||||
post = create_post
|
||||
PostActionCreator.create(flagger, post, :spam)
|
||||
|
||||
SiteSetting.min_score_default_visibility = 3.0
|
||||
posts, topics, users = FlagQuery.flagged_posts_report(admin)
|
||||
expect(posts).to be_blank
|
||||
expect(topics).to be_blank
|
||||
|
Reference in New Issue
Block a user