Skip to content

Commit 21f5671

Browse files
committed
Move question caption from legend
1 parent 3fe420a commit 21f5671

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

app/views/smart_answers/inputs/_checkbox_question.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
<%= render "smart_answers/inputs/caption", question: question %>
12
<%= render "govuk_publishing_components/components/checkboxes", {
23
name: "response[]",
34
heading: question.title,
45
heading_size: "l",
5-
heading_caption: question.caption,
66
is_page_heading: true,
77
description: question.body,
88
id: "response",

app/views/smart_answers/inputs/_radio_question.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
<%= render "smart_answers/inputs/caption", question: question %>
12
<%= render "govuk_publishing_components/components/radio", {
23
name: "response",
34
heading: question.title,
45
heading_size: "l",
5-
heading_caption: question.caption,
66
heading_level: 1,
77
hint: question.hint,
88
id_prefix: "response",

test/functional/smart_answers_controller_checkbox_question_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SmartAnswersControllerCheckboxQuestionTest < ActionController::TestCase
1212
context "checkbox question" do
1313
should "display question" do
1414
get :show, params: { id: "checkbox-sample", started: "y" }
15-
assert_select ".govuk-fieldset__legend.govuk-fieldset__legend--l .govuk-caption-l", "Sample checkbox question"
15+
assert_select ".govuk-caption-l", "Sample checkbox question"
1616
assert_select ".govuk-fieldset__legend.govuk-fieldset__legend--l h1.govuk-fieldset__heading", /What do you want on your pizza\?/
1717
assert_select "input[type=checkbox][name=\"response[]\"]"
1818
end

test/functional/smart_answers_controller_radio_question_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SmartAnswersControllerRadioQuestionTest < ActionController::TestCase
1212
context "radio question" do
1313
should "display question" do
1414
get :show, params: { id: "radio-sample", started: "y" }
15-
assert_select ".govuk-fieldset__legend.govuk-fieldset__legend--l .govuk-caption-l", "Sample radio question"
15+
assert_select ".govuk-caption-l", "Sample radio question"
1616
assert_select ".govuk-fieldset__legend.govuk-fieldset__legend--l h1.govuk-fieldset__heading", /Hotter or colder\?/
1717
assert_select "input[type=radio][name=response]"
1818
end

0 commit comments

Comments
 (0)