Skip to content

Commit

Permalink
AP-5592: Create feature test of scope limits on check provider answers
Browse files Browse the repository at this point in the history
This changes the proceeding_details partial IDs quite heavily
to make testing easier.
  • Loading branch information
colinbruce committed Dec 17, 2024
1 parent 691ec50 commit 27dc907
Show file tree
Hide file tree
Showing 5 changed files with 1,450 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/check-your-answers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@
.print-no-break>.govuk-body {
word-wrap: break-word;
}

.single-scope-limit-bold-heading {
font-weight: bold;
}
7 changes: 4 additions & 3 deletions app/views/shared/check_answers/_proceeding_details.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
unless @show_linked_proceedings || @read_only
govuk_link_to(t("generic.change"),
providers_legal_aid_application_client_involvement_type_path(@legal_aid_application, proceeding),
id: "app-check-your-answers__#{proceeding.ccms_code.downcase}",
visually_hidden_suffix: "#{proceeding.meaning} #{t('.description')}")
end
end

card.with_summary_list(actions: false) do |summary_list|
card.with_summary_list(actions: false, html_attributes: { id: "#{proceeding.ccms_code.downcase}-questions" }) do |summary_list|
summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.name}_client_involvement_type" }) do |row|
row.with_key(text: t(".client_involvement_type_details.question"), classes: "govuk-!-width-one-third")
row.with_value { proceeding.client_involvement_type_description }
Expand All @@ -34,7 +35,7 @@
end
end

summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.name}_emergency_scope_limitations_#{proceeding.id}" }) do |row|
summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.ccms_code.downcase}_emergency_scope_limitations" }) do |row|
row.with_key(text: t(".scope_limits.emergency.question"))
row.with_value { scope_limits(proceeding, "emergency") }
end
Expand All @@ -54,7 +55,7 @@
end
end

summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.name}_substantive_scope_limitations_#{proceeding.id}" }) do |row|
summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.ccms_code.downcase}_substantive_scope_limitations" }) do |row|
row.with_key(text: t(".scope_limits.substantive.question"))
row.with_value { scope_limits(proceeding, "substantive") }
end
Expand Down
Loading

0 comments on commit 27dc907

Please sign in to comment.