diff --git a/spec/features/form/check_answers_page_spec.rb b/spec/features/form/check_answers_page_spec.rb index 4e4253470..a206505e4 100644 --- a/spec/features/form/check_answers_page_spec.rb +++ b/spec/features/form/check_answers_page_spec.rb @@ -133,6 +133,19 @@ RSpec.describe "Form Check Answers Page" do end end + it "has no summary cards if the subsection is not household characteristics" do + visit("/logs/#{completed_case_log.id}/household-needs/check-answers") + assert_selector ".x-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 seperate summary card for each member of the household" do + visit("/logs/#{completed_case_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 + end + end + context "when viewing setup section answers" do before do FactoryBot.create(:location, scheme:)