Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redirect to sign out complete page #846

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading