From 6c94e8cb2c5884c09133296003524ab6456e21db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Meny?= Date: Fri, 17 Jun 2022 15:18:23 +0100 Subject: [PATCH] Fix post merge issues --- spec/features/form/saving_data_spec.rb | 2 +- spec/helpers/tasklist_helper_spec.rb | 6 +++--- spec/requests/case_logs_controller_spec.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/features/form/saving_data_spec.rb b/spec/features/form/saving_data_spec.rb index cfc1013df..97aeb7521 100644 --- a/spec/features/form/saving_data_spec.rb +++ b/spec/features/form/saving_data_spec.rb @@ -23,7 +23,7 @@ RSpec.describe "Form Saving Data" do end let(:question_answers) do { - tenancycode: { type: "text", answer: "BZ737", path: "tenancycode" }, + tenancycode: { type: "text", answer: "BZ737", path: "tenant-code-test" }, age1: { type: "numeric", answer: 25, path: "person_1_age" }, sex1: { type: "radio", answer: { "F" => "Female" }, path: "person_1_gender" }, hhmemb: { type: "numeric", answer: 3, path: "household_number_of_members" }, diff --git a/spec/helpers/tasklist_helper_spec.rb b/spec/helpers/tasklist_helper_spec.rb index 2478f4cf7..daf7ba0d9 100644 --- a/spec/helpers/tasklist_helper_spec.rb +++ b/spec/helpers/tasklist_helper_spec.rb @@ -17,7 +17,7 @@ RSpec.describe TasklistHelper do describe "get sections count" do it "returns the total of sections if no status is given" do - expect(get_subsections_count(empty_case_log)).to eq(10) + expect(get_subsections_count(empty_case_log)).to eq(9) end it "returns 0 sections for completed sections if no sections are completed" do @@ -25,7 +25,7 @@ RSpec.describe TasklistHelper do end it "returns the number of not started sections" do - expect(get_subsections_count(empty_case_log, :not_started)).to eq(9) + expect(get_subsections_count(empty_case_log, :not_started)).to eq(8) end it "returns the number of sections in progress" do @@ -45,7 +45,7 @@ RSpec.describe TasklistHelper do end it "returns the first question page path for the section if it has not been started yet" do - expect(next_page_or_check_answers(subsection, empty_case_log)).to match(/tenancycode/) + expect(next_page_or_check_answers(subsection, empty_case_log)).to match(/tenant-code-test/) end it "when first question being not routed to returns the next routed question link" do diff --git a/spec/requests/case_logs_controller_spec.rb b/spec/requests/case_logs_controller_spec.rb index f9bbeffd9..6a51d5d74 100644 --- a/spec/requests/case_logs_controller_spec.rb +++ b/spec/requests/case_logs_controller_spec.rb @@ -624,7 +624,7 @@ RSpec.describe CaseLogsController, type: :request do it "displays a section status for a case log" do assert_select ".govuk-tag", text: /Not started/, count: 7 - assert_select ".govuk-tag", text: /In progress/, count: 2 + assert_select ".govuk-tag", text: /In progress/, count: 1 assert_select ".govuk-tag", text: /Completed/, count: 0 assert_select ".govuk-tag", text: /Cannot start yet/, count: 1 end