mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 11:52:45 +08:00
DEV: Try fix category form template flaky (#22461)
1) Edit Category when editing a category with form templates set should have form templates enabled and showing the selected templates Failure/Error: expect(category_page).to have_selected_template(selected_templates) expected `#<PageObjects::Pages::Category:0x00007fdb278fbd30>.has_selected_template?("template_0,template_1")` to be truthy, got false Wait for CSS rather than trying to compare attr directly and also make sure the ids are always in order.
This commit is contained in:
parent
9b14bf82dc
commit
e7cbf15040
|
@ -9,6 +9,10 @@ class SiteCategorySerializer < BasicCategorySerializer
|
||||||
|
|
||||||
has_many :category_required_tag_groups, key: :required_tag_groups, embed: :objects
|
has_many :category_required_tag_groups, key: :required_tag_groups, embed: :objects
|
||||||
|
|
||||||
|
def form_template_ids
|
||||||
|
object.form_template_ids.sort
|
||||||
|
end
|
||||||
|
|
||||||
def include_allowed_tags?
|
def include_allowed_tags?
|
||||||
SiteSetting.tagging_enabled
|
SiteSetting.tagging_enabled
|
||||||
end
|
end
|
||||||
|
|
|
@ -51,7 +51,7 @@ module PageObjects
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_selected_template?(template_name)
|
def has_selected_template?(template_name)
|
||||||
find(".select-category-template .select-kit-header")["data-name"] == template_name
|
has_css?(".select-category-template .select-kit-header[data-name='#{template_name}']")
|
||||||
end
|
end
|
||||||
|
|
||||||
def toggle_form_templates
|
def toggle_form_templates
|
||||||
|
|
Loading…
Reference in New Issue
Block a user