Skip to content

Commit 0679986

Browse files
committed
wip: testing character limits
1 parent f3cde48 commit 0679986

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/components/question/text_component/view.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
<%= form_builder.govuk_text_area :text,
77
label: { text: question_text_with_extra_suffix, **question_text_size_and_tag },
88
hint: { text: question.hint_text },
9+
max_chars: 4999,
10+
threshold: 99,
911
rows: 5 %>
1012
<% end %>

spec/components/question/text_component/view_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
let(:question_page) { build :page, :with_hints, :with_text_settings, input_type: }
102102

103103
it "outputs the hint text" do
104-
expect(page.find(".govuk-hint")).to have_text(question.hint_text)
104+
expect(page.find("#form-text-hint.govuk-hint")).to have_text(question.hint_text)
105105
end
106106
end
107107

0 commit comments

Comments
 (0)