From 9e297c6fabff76a4ad5c6f7959e80fad7fa1cb6c Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Tue, 22 Mar 2022 13:58:34 +0000 Subject: [PATCH] Add additional spec for tasklist page --- spec/features/form/tasklist_page_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/features/form/tasklist_page_spec.rb b/spec/features/form/tasklist_page_spec.rb index 7f869ded4..c30a73052 100644 --- a/spec/features/form/tasklist_page_spec.rb +++ b/spec/features/form/tasklist_page_spec.rb @@ -42,4 +42,13 @@ RSpec.describe "Task List" do visit("/logs/#{empty_case_log.id}") expect(page).to have_link("Skip to next incomplete section", href: /#household-characteristics/) end + + context "when the 'Skip to next incomplete section is clicked'" do + it "jumps to the next incomplete section" do + answer_all_questions_in_income_subsection(empty_case_log) + visit("/logs/#{empty_case_log.id}") + click_link("Skip to next incomplete section") + expect(page).to have_current_path("/logs/#{empty_case_log.id}#household-characteristics") + end + end end