Skip to content

Commit

Permalink
Merge pull request #7083 from ministryofjustice/ap-5149/update-sca-wo…
Browse files Browse the repository at this point in the history
…rding

AP-5149: Update SCA proceeding questions to remove core
  • Loading branch information
colinbruce authored Aug 28, 2024
2 parents 68d8391 + 24cc994 commit 2610d0e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
method: :patch,
local: true,
) do |form| %>
<%= page_template page_title: t(".page_title.#{@amount}"),
<%= page_template page_title: t(".page_title.multiple"),
template: :basic,
form: do %>
<%= form.govuk_collection_radio_buttons :heard_as_alternative,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
method: :patch,
local: true,
) do |form| %>
<%= page_template page_title: t(".page_title"), form:, template: :basic do %>
<%= page_template page_title: t(".page_title.multiple"), form:, template: :basic do %>
<%= form.govuk_collection_radio_buttons :heard_together,
yes_no_options,
:value,
:label,
caption: { text: @current_proceeding.meaning, size: "xl" },
legend: { text: t(".page_heading.#{@amount}", core_sca: @core_proceedings.first.meaning), size: "xl", tag: "h1" } do %>
legend: { text: t(".page_title.#{@amount}", core_sca: @core_proceedings.first.meaning), size: "xl", tag: "h1" } do %>
<% if @amount.eql?("multiple") %>
<p class="govuk-body">These are:</p>
<%= govuk_list @core_proceedings.pluck(:meaning), type: :bullet %>
Expand Down
17 changes: 6 additions & 11 deletions config/locales/en/providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1699,12 +1699,11 @@ en:
hint: We'll use this to send your client a link to the service.
proceedings_sca:
heard_togethers:
error: Select yes if this proceeding will be heard together with any special children act core proceedings
error: Select yes if this proceeding will be heard together with any special children act proceedings
show:
page_title: Will this proceeding be heard together with any special children act core proceedings?
page_heading:
page_title:
single: Will this proceeding be heard together with the '%{core_sca}' proceeding?
multiple: Will this proceeding be heard together with any of the core proceedings?
multiple: Will this proceeding be heard together with any of the special children act proceedings?
supervision_orders:
error: Select yes if the application is to vary, discharge or extend a supervision order
show:
Expand All @@ -1717,14 +1716,10 @@ en:
heard_as_alternatives:
show:
error:
Select yes if this proceeding will be heard as an alternative to any of
the special children act core proceedings
Select yes if this proceeding will be heard as an alternative to any of the special children act proceedings
page_title:
single:
Will this proceeding be heard as an alternative to the '%{proceeding}' proceeding?
multiple:
Will this proceeding be heard as an alternative to any of the special
children act core proceedings?
single: Will this proceeding be heard as an alternative to the '%{proceeding}' proceeding?
multiple: Will this proceeding be heard as an alternative to any of the special children act proceedings?
change_of_names:
error: Select yes if this proceeding is for a change of name application
show:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
context "when there is one core proceeding" do
it "returns http success" do
expect(response).to have_http_status(:ok)
expect(unescaped_response_body).to include(I18n.t("providers.proceedings_sca.heard_as_alternatives.show.page_title.single"))
expect(response.body).to include("Will this proceeding be heard as an alternative to the &#39;Child assessment order&#39; proceeding?").once
expect(response.body).to include("Will this proceeding be heard as an alternative to any of the special children act proceedings?").once
end
end

Expand Down Expand Up @@ -79,7 +80,7 @@

it "renders the same page with an error message" do
expect(response).to have_http_status(:unprocessable_content)
expect(response.body).to include("Select yes if this proceeding will be heard as an alternative to any of the special children act core proceedings").twice
expect(response.body).to include("Select yes if this proceeding will be heard as an alternative to any of the special children act proceedings").twice
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

it "returns http success" do
expect(response).to have_http_status(:ok)
expect(unescaped_response_body).to include(I18n.t("providers.proceedings_sca.heard_togethers.show.page_heading.single", core_sca:))
expect(unescaped_response_body).to include(I18n.t("providers.proceedings_sca.heard_togethers.show.page_title.single", core_sca:))
end
end

Expand All @@ -37,7 +37,7 @@

it "returns http success" do
expect(response).to have_http_status(:ok)
expect(response.body).to include(I18n.t("providers.proceedings_sca.heard_togethers.show.page_heading.multiple"))
expect(response.body).to include(I18n.t("providers.proceedings_sca.heard_togethers.show.page_title.multiple"))
end
end
end
Expand Down Expand Up @@ -84,7 +84,7 @@

it "renders the same page with an error message" do
expect(response).to have_http_status(:unprocessable_content)
expect(response.body).to include("Select yes if this proceeding will be heard together with any special children act core proceedings").twice
expect(response.body).to include("Select yes if this proceeding will be heard together with any special children act proceedings").twice
end
end
end
Expand Down

0 comments on commit 2610d0e

Please sign in to comment.