Browse Source

Fix post merge issues

pull/650/head
Stéphane Meny 3 years ago
parent
commit
6c94e8cb2c
No known key found for this signature in database
GPG Key ID: 9D0AFEA988527923
  1. 2
      spec/features/form/saving_data_spec.rb
  2. 6
      spec/helpers/tasklist_helper_spec.rb
  3. 2
      spec/requests/case_logs_controller_spec.rb

2
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" },

6
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

2
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

Loading…
Cancel
Save