DEV: Show form templates in the composer (#21190)

This commit is contained in:
Keegan George
2023-05-29 14:47:18 -07:00
committed by GitHub
parent 5abe98afb5
commit c74c90bae5
26 changed files with 548 additions and 96 deletions

View File

@ -72,6 +72,11 @@ module PageObjects
find(AUTOCOMPLETE_MENU)
end
def switch_category(category_name)
find(".category-chooser").click
find(".category-row[data-name='#{category_name}']").click
end
def has_emoji_autocomplete?
has_css?(AUTOCOMPLETE_MENU)
end
@ -98,6 +103,22 @@ module PageObjects
page.has_no_css?(emoji_preview_selector(emoji))
end
def has_composer_input?
page.has_css?("#{COMPOSER_ID} .d-editor .d-editor-input")
end
def has_form_template?
page.has_css?(".form-template-form__wrapper")
end
def has_form_template_field?(field)
page.has_css?(".form-template-field[data-field-type='#{field}']")
end
def has_form_template_chooser?
page.has_css?(".composer-select-form-template")
end
def composer_input
find("#{COMPOSER_ID} .d-editor .d-editor-input")
end