FIX: missing flag serializer (#27683)
FlagSerializer is using in this PR https://github.com/discourse/discourse/pull/27484 but was not staged.
This commit is contained in:
parent
c3fadc7330
commit
57af5d6f0d
|
@ -0,0 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class FlagSerializer < ApplicationSerializer
|
||||
attributes :id, :name, :name_key, :description, :applies_to, :position, :enabled
|
||||
end
|
|
@ -75,6 +75,18 @@ describe "Admin Flags Page", type: :system do
|
|||
admin_flag_form_page.fill_in_applies_to("Post")
|
||||
admin_flag_form_page.click_save
|
||||
|
||||
expect(all(".admin-flag-item__name").map(&:text)).to eq(
|
||||
[
|
||||
"Send @%{username} a message",
|
||||
"Off-Topic",
|
||||
"Inappropriate",
|
||||
"Spam",
|
||||
"Illegal",
|
||||
"Something Else",
|
||||
"Vulgar",
|
||||
],
|
||||
)
|
||||
|
||||
topic_page.visit_topic(post.topic)
|
||||
topic_page.open_flag_topic_modal
|
||||
expect(all(".flag-action-type-details strong").map(&:text)).to eq(
|
||||
|
|
Loading…
Reference in New Issue