Skip to content

Commit

Permalink
Merge pull request #846 from DFE-Digital/Add-redirect-to-sign-out-com…
Browse files Browse the repository at this point in the history
…plete-page

Add redirect to sign out complete page
  • Loading branch information
richardpattinson authored Sep 25, 2024
2 parents df415e4 + 051189e commit 02dc1d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def create
end

def complete
redirect_to qualifications_root_path
end
end
end
Expand Down
8 changes: 3 additions & 5 deletions spec/system/qualifications/user_signs_out_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
and_i_am_signed_in_via_identity
when_i_click_the_sign_out_link
and_confirm_my_sign_out
then_i_see_the_confirmation_page
when_i_click_the_button_to_take_me_back_to_the_service
then_i_am_on_service_start_page
then_i_am_on_service_sign_in_page
end

private
Expand All @@ -30,8 +28,8 @@ def and_confirm_my_sign_out
click_button "Confirm"
end

def then_i_see_the_confirmation_page
expect(page).to have_content "You are now signed out"
def then_i_am_on_service_sign_in_page
expect(page).to have_current_path qualifications_sign_in_path
end

def when_i_click_the_button_to_take_me_back_to_the_service
Expand Down
16 changes: 3 additions & 13 deletions spec/system/qualifications/user_signs_out_via_onelogin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
and_i_am_signed_in_via_onelogin
when_i_click_the_sign_out_link
and_confirm_my_sign_out
then_i_see_the_confirmation_page
when_i_click_the_button_to_take_me_back_to_the_service
then_i_am_on_service_start_page
then_i_see_the_sign_in_page
end

private
Expand All @@ -31,16 +29,8 @@ def and_confirm_my_sign_out
click_button "Confirm"
end

def then_i_see_the_confirmation_page
expect(page).to have_content "You are now signed out"
end

def when_i_click_the_button_to_take_me_back_to_the_service
click_link "Back to GOV.UK"
end

def then_i_am_on_service_start_page
expect(page).to have_current_path qualifications_start_path
def then_i_see_the_sign_in_page
expect(page).to have_current_path qualifications_sign_in_path
end
end

0 comments on commit 02dc1d3

Please sign in to comment.