|
|
|
@ -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 |
|
|
|
|
|
|
|
|
|