summaryrefslogtreecommitdiffstats
path: root/test/helpers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-03-17 11:52:12 +0000
committerGo MAEDA <maeda@farend.jp>2022-03-17 11:52:12 +0000
commit8529e39e6da800f2f075d04362eb49a32bc83e64 (patch)
tree24cb1396d97d745ecbe279834cd5594a53c5c4f3 /test/helpers
parente1ae7f5c8418cf0c908a78e86913bdab3cd35491 (diff)
downloadredmine-8529e39e6da800f2f075d04362eb49a32bc83e64.tar.gz
redmine-8529e39e6da800f2f075d04362eb49a32bc83e64.zip
Show a custom field description as a placeholder (#14275).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@21460 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers')
-rw-r--r--test/helpers/custom_fields_helper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/helpers/custom_fields_helper_test.rb b/test/helpers/custom_fields_helper_test.rb
index 7c560e87e..0c5ad0666 100644
--- a/test/helpers/custom_fields_helper_test.rb
+++ b/test/helpers/custom_fields_helper_test.rb
@@ -96,6 +96,13 @@ class CustomFieldsHelperTest < Redmine::HelperTest
assert_select_in custom_field_tag('object', value), "textarea.text_cf.wiki-edit.cf_#{field.id}"
end
+ def test_custom_field_tag_class_should_contain_placeholder
+ field = IssueCustomField.create!(:name => 'Text', :field_format => 'string', :description => "Foo\nBar\nBaz")
+ value = CustomValue.new(:value => 'bar', :custom_field => field)
+
+ assert_select_in custom_field_tag('object', value), "input.string_cf.cf_#{field.id}[placeholder=?]", 'Foo Bar Baz'
+ end
+
def test_select_type_radio_buttons
result = select_type_radio_buttons('UserCustomField')
assert_select_in result, 'input[type="radio"]', :count => 10