diff --git a/app/components/bulk_upload_error_row_component.html.erb b/app/components/bulk_upload_error_row_component.html.erb index 54a2c6c93..edf480a1a 100644 --- a/app/components/bulk_upload_error_row_component.html.erb +++ b/app/components/bulk_upload_error_row_component.html.erb @@ -1,13 +1,13 @@ -
-
+
+
<% if lettings? %> -

Row <%= row %> <%= tenant_code_html %> <%= property_ref_html %>

+

Row <%= row %> <%= tenant_code_html %> <%= property_ref_html %>

<% else %> -

Row <%= row %> <%= purchaser_code_html %>

+

Row <%= row %> <%= purchaser_code_html %>

<% end %>
-
+
<%= govuk_table do |table| %> <% table.head do |head| %> <% head.row do |row| %> diff --git a/app/components/check_answers_summary_list_card_component.html.erb b/app/components/check_answers_summary_list_card_component.html.erb index 1a807640b..a2fad6445 100644 --- a/app/components/check_answers_summary_list_card_component.html.erb +++ b/app/components/check_answers_summary_list_card_component.html.erb @@ -1,12 +1,12 @@ <% if applicable_questions.first %> -
+
<% if applicable_questions.first.check_answers_card_number != 0 && applicable_questions.first.check_answers_card_number.present? %> -
-

<%= check_answers_card_title(applicable_questions.first) %>

+
+

<%= check_answers_card_title(applicable_questions.first) %>

<% end %> -
+
<%= govuk_summary_list do |summary_list| %> <% applicable_questions.each do |question| %> <% summary_list.row do |row| %> diff --git a/app/views/form/_interruption_screen_question.html.erb b/app/views/form/_interruption_screen_question.html.erb index a37254d1e..73c355588 100644 --- a/app/views/form/_interruption_screen_question.html.erb +++ b/app/views/form/_interruption_screen_question.html.erb @@ -3,8 +3,8 @@

Make sure these answers are correct:

-
-
+
+
<%= render partial: "form/check_answers_summary_list", locals: { lettings_log:, diff --git a/app/views/form/review.html.erb b/app/views/form/review.html.erb index 9a94059e4..39682362d 100644 --- a/app/views/form/review.html.erb +++ b/app/views/form/review.html.erb @@ -14,11 +14,11 @@

<%= section.label %>

<% section.subsections.map do |subsection| %> <% if total_applicable_questions(subsection, @log, current_user).any? %> -
-
-

<%= subsection.label %>

+
+
+

<%= subsection.label %>

-
+
<%= render partial: "form/check_answers_summary_list", locals: { subsection:, questions: total_applicable_questions(subsection, @log, current_user), referrer: "check_answers" } %>
diff --git a/spec/features/form/check_answers_page_lettings_logs_spec.rb b/spec/features/form/check_answers_page_lettings_logs_spec.rb index 5506e53b1..9ff419f93 100644 --- a/spec/features/form/check_answers_page_lettings_logs_spec.rb +++ b/spec/features/form/check_answers_page_lettings_logs_spec.rb @@ -148,14 +148,14 @@ RSpec.describe "Lettings Log Check Answers Page" do it "does not group questions into summary cards if the questions in the subsection don't have a check_answers_card_number attribute" do visit("/lettings-logs/#{completed_lettings_log.id}/household-needs/check-answers") - assert_selector ".x-govuk-summary-card__title", count: 0 + assert_selector ".govuk-summary-card__title", count: 0 end context "when the user is checking their answers for the household characteristics subsection" do it "they see a separate summary card for each member of the household" do visit("/lettings-logs/#{completed_lettings_log.id}/#{subsection}/check-answers") - assert_selector ".x-govuk-summary-card__title", text: "Lead tenant", count: 1 - assert_selector ".x-govuk-summary-card__title", text: "Person 2", count: 1 + assert_selector ".govuk-summary-card__title", text: "Lead tenant", count: 1 + assert_selector ".govuk-summary-card__title", text: "Person 2", count: 1 end end diff --git a/spec/features/form/check_answers_page_sales_logs_spec.rb b/spec/features/form/check_answers_page_sales_logs_spec.rb index 5c9e9b65c..3e851ba69 100644 --- a/spec/features/form/check_answers_page_sales_logs_spec.rb +++ b/spec/features/form/check_answers_page_sales_logs_spec.rb @@ -36,33 +36,33 @@ RSpec.describe "Sales Log Check Answers Page" do it "does not group questions into summary cards if the questions in the subsection don't have a check_answers_card_number attribute" do visit("/sales-logs/#{completed_sales_log_joint_purchase.id}/household-needs/check-answers") - assert_selector ".x-govuk-summary-card__title", count: 0 + assert_selector ".govuk-summary-card__title", count: 0 end context "when the user is checking their answers for the household characteristics subsection" do context "and the log is for a joint purchase" do it "they see a separate summary card for each member of the household" do visit("/sales-logs/#{completed_sales_log_joint_purchase.id}/#{subsection}/check-answers") - assert_selector ".x-govuk-summary-card__title", text: "Buyer 1", count: 1 - assert_selector ".x-govuk-summary-card__title", text: "Buyer 2", count: 1 - assert_selector ".x-govuk-summary-card__title", text: "Person 1", count: 0 - assert_selector ".x-govuk-summary-card__title", text: "Person 2", count: 0 - assert_selector ".x-govuk-summary-card__title", text: "Person 3", count: 1 - assert_selector ".x-govuk-summary-card__title", text: "Person 4", count: 1 - assert_selector ".x-govuk-summary-card__title", text: "Person 5", count: 1 + assert_selector ".govuk-summary-card__title", text: "Buyer 1", count: 1 + assert_selector ".govuk-summary-card__title", text: "Buyer 2", count: 1 + assert_selector ".govuk-summary-card__title", text: "Person 1", count: 0 + assert_selector ".govuk-summary-card__title", text: "Person 2", count: 0 + assert_selector ".govuk-summary-card__title", text: "Person 3", count: 1 + assert_selector ".govuk-summary-card__title", text: "Person 4", count: 1 + assert_selector ".govuk-summary-card__title", text: "Person 5", count: 1 end end context "and the log is for a non-joint purchase" do it "they see a separate summary card for each member of the household" do visit("/sales-logs/#{completed_sales_log_non_joint_purchase.id}/#{subsection}/check-answers") - assert_selector ".x-govuk-summary-card__title", text: "Buyer 1", count: 1 - assert_selector ".x-govuk-summary-card__title", text: "Buyer 2", count: 0 - assert_selector ".x-govuk-summary-card__title", text: "Person 1", count: 0 - assert_selector ".x-govuk-summary-card__title", text: "Person 2", count: 1 - assert_selector ".x-govuk-summary-card__title", text: "Person 3", count: 1 - assert_selector ".x-govuk-summary-card__title", text: "Person 4", count: 1 - assert_selector ".x-govuk-summary-card__title", text: "Person 5", count: 1 + assert_selector ".govuk-summary-card__title", text: "Buyer 1", count: 1 + assert_selector ".govuk-summary-card__title", text: "Buyer 2", count: 0 + assert_selector ".govuk-summary-card__title", text: "Person 1", count: 0 + assert_selector ".govuk-summary-card__title", text: "Person 2", count: 1 + assert_selector ".govuk-summary-card__title", text: "Person 3", count: 1 + assert_selector ".govuk-summary-card__title", text: "Person 4", count: 1 + assert_selector ".govuk-summary-card__title", text: "Person 5", count: 1 end end end diff --git a/spec/views/bulk_upload_lettings_results/show.html.erb_spec.rb b/spec/views/bulk_upload_lettings_results/show.html.erb_spec.rb index 62da07d01..3dea3ce92 100644 --- a/spec/views/bulk_upload_lettings_results/show.html.erb_spec.rb +++ b/spec/views/bulk_upload_lettings_results/show.html.erb_spec.rb @@ -16,7 +16,7 @@ RSpec.describe "bulk_upload_lettings_results/show.html.erb" do fragment = Capybara::Node::Simple.new(rendered) - expect(fragment.find_css(".x-govuk-summary-card__title strong").map(&:inner_text)).to eql(["Row 10", "Row 14"]) + expect(fragment.find_css(".govuk-summary-card__title strong").map(&:inner_text)).to eql(["Row 10", "Row 14"]) end end diff --git a/spec/views/bulk_upload_lettings_results/summary.html.erb_spec.rb b/spec/views/bulk_upload_lettings_results/summary.html.erb_spec.rb index 242e58d4e..05e2dce85 100644 --- a/spec/views/bulk_upload_lettings_results/summary.html.erb_spec.rb +++ b/spec/views/bulk_upload_lettings_results/summary.html.erb_spec.rb @@ -16,7 +16,7 @@ RSpec.describe "bulk_upload_lettings_results/summary.html.erb" do fragment = Capybara::Node::Simple.new(rendered) - expect(fragment.find_css(".x-govuk-summary-card__title strong").map(&:inner_text)).to eql(["Row 10", "Row 14"]) + expect(fragment.find_css(".govuk-summary-card__title strong").map(&:inner_text)).to eql(["Row 10", "Row 14"]) end end diff --git a/spec/views/bulk_upload_sales_results/show.html.erb_spec.rb b/spec/views/bulk_upload_sales_results/show.html.erb_spec.rb index b553d27ce..785d830b3 100644 --- a/spec/views/bulk_upload_sales_results/show.html.erb_spec.rb +++ b/spec/views/bulk_upload_sales_results/show.html.erb_spec.rb @@ -16,7 +16,7 @@ RSpec.describe "bulk_upload_sales_results/show.html.erb" do fragment = Capybara::Node::Simple.new(rendered) - expect(fragment.find_css(".x-govuk-summary-card__title strong").map(&:inner_text)).to eql(["Row 10", "Row 14"]) + expect(fragment.find_css(".govuk-summary-card__title strong").map(&:inner_text)).to eql(["Row 10", "Row 14"]) end end diff --git a/spec/views/bulk_upload_sales_results/summary.html.erb_spec.rb b/spec/views/bulk_upload_sales_results/summary.html.erb_spec.rb index 4ac2e3807..6c00e5adf 100644 --- a/spec/views/bulk_upload_sales_results/summary.html.erb_spec.rb +++ b/spec/views/bulk_upload_sales_results/summary.html.erb_spec.rb @@ -16,7 +16,7 @@ RSpec.describe "bulk_upload_sales_results/summary.html.erb" do fragment = Capybara::Node::Simple.new(rendered) - expect(fragment.find_css(".x-govuk-summary-card__title strong").map(&:inner_text)).to eql(["Row 10", "Row 14"]) + expect(fragment.find_css(".govuk-summary-card__title strong").map(&:inner_text)).to eql(["Row 10", "Row 14"]) end end