diff --git a/.gitignore b/.gitignore index 93d1e2481..dda9e9e33 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,6 @@ yarn-debug.log* #IDE specific files /.idea /.idea/* +.DS_Store +.generators +.rakeTasks diff --git a/spec/features/case_log_spec.rb b/spec/features/case_log_spec.rb index e48a8f79d..ee0f2256a 100644 --- a/spec/features/case_log_spec.rb +++ b/spec/features/case_log_spec.rb @@ -49,7 +49,7 @@ RSpec.describe "Test Features" do it "displays a section status" do visit("/case_logs/#{empty_case_log.id}") - assert_selector ".govuk-tag", text: /Not started/, count: 7 + assert_selector ".govuk-tag", text: /Not started/, count: 8 assert_selector ".govuk-tag", text: /Completed/, count: 0 assert_selector ".govuk-tag", text: /Cannot start yet/, count: 1 end @@ -58,7 +58,7 @@ RSpec.describe "Test Features" do answer_all_questions_in_income_subsection visit("/case_logs/#{empty_case_log.id}") - assert_selector ".govuk-tag", text: /Not started/, count: 6 + assert_selector ".govuk-tag", text: /Not started/, count: 7 assert_selector ".govuk-tag", text: /Completed/, count: 1 assert_selector ".govuk-tag", text: /Cannot start yet/, count: 1 end @@ -70,13 +70,13 @@ RSpec.describe "Test Features" do it "shows the number of completed sections if no sections are completed" do visit("/case_logs/#{empty_case_log.id}") - expect(page).to have_content("You've completed 0 of 8 sections.") + expect(page).to have_content("You've completed 0 of 9 sections.") end it "shows the number of completed sections if one section is completed" do answer_all_questions_in_income_subsection visit("/case_logs/#{empty_case_log.id}") - expect(page).to have_content("You've completed 1 of 8 sections.") + expect(page).to have_content("You've completed 1 of 9 sections.") end end @@ -302,7 +302,7 @@ RSpec.describe "Test Features" do visit("case_logs/#{id}/conditional_question") # using a question name that is already in the db to avoid # having to add a new column to the db for this test - choose("case-log-pregnancy-yes-field") + choose("case-log-pregnancy-yes-field") click_button("Save and continue") expect(page).to have_current_path("/case_logs/#{id}/conditional_question_yes_page") click_link(text: "Back") @@ -310,5 +310,5 @@ RSpec.describe "Test Features" do click_button("Save and continue") expect(page).to have_current_path("/case_logs/#{id}/conditional_question_no_page") end - end + end end diff --git a/spec/helpers/tasklist_helper_spec.rb b/spec/helpers/tasklist_helper_spec.rb index 42cdcfb78..1252f1b66 100644 --- a/spec/helpers/tasklist_helper_spec.rb +++ b/spec/helpers/tasklist_helper_spec.rb @@ -54,7 +54,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(form, empty_case_log)).to eq(8) + expect(get_subsections_count(form, empty_case_log)).to eq(9) end it "returns 0 sections for completed sections if no sections are completed" do @@ -62,7 +62,7 @@ RSpec.describe TasklistHelper do end it "returns the number of not started sections" do - expect(get_subsections_count(form, empty_case_log, :not_started)).to eq(7) + expect(get_subsections_count(form, empty_case_log, :not_started)).to eq(8) end it "returns the number of sections in progress" do diff --git a/spec/models/form_handler_spec.rb b/spec/models/form_handler_spec.rb index 239326199..27c80d5ea 100644 --- a/spec/models/form_handler_spec.rb +++ b/spec/models/form_handler_spec.rb @@ -15,7 +15,7 @@ RSpec.describe FormHandler do form_handler = FormHandler.instance form = form_handler.get_form("test_form") expect(form).to be_a(Form) - expect(form.all_pages.count).to eq(18) + expect(form.all_pages.count).to eq(21) end end