Fix blacklists not working on /comments page.
This rule:
.post-preview.blacklisted-active, #image-container.blacklisted-active, #c-comments .post.blacklisted-active {
display: none;
}
was being overridden by this rule:
div#c-comments div#a-index div.post, div#c-comments div#a-show div.post {
display: flex;
}
This commit is contained in:
@@ -41,5 +41,5 @@
|
||||
}
|
||||
|
||||
.post-preview.blacklisted-active, #image-container.blacklisted-active, #c-comments .post.blacklisted-active {
|
||||
display: none;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
16
test/system/blacklist_test.rb
Normal file
16
test/system/blacklist_test.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
require "application_system_test_case"
|
||||
|
||||
class BlacklistTest < ApplicationSystemTestCase
|
||||
context "Blacklists" do
|
||||
context "on the /comments page" do
|
||||
should "hide the entire post" do
|
||||
user = create(:user, created_at: 1.month.ago)
|
||||
post = create(:post, tag_string: "spoilers")
|
||||
comment = as(user) { create(:comment, post: post) }
|
||||
|
||||
visit comments_path
|
||||
assert_selector ".post", visible: :hidden
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user