Skip to content
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 @@ -73,7 +73,7 @@ def cancel_url
if user_fully_authenticated?
account_path
elsif decorated_sp_session.sp_name
return_to_sp_cancel_path
return_to_sp_cancel_path(step: :sms_opt_in)
else
sign_out_path
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= link_to(
"‹ #{t('links.back_to_sp', sp: decorated_sp_session.sp_name)}",
return_to_sp_cancel_path,
return_to_sp_cancel_path(step: :authentication),
) %>
2 changes: 1 addition & 1 deletion app/views/idv/by_mail/letter_enqueued/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<% if decorated_sp_session.sp_name.present? %>
<%= link_to(
t('idv.cancel.actions.exit', app_name: APP_NAME),
return_to_sp_cancel_path(location: :come_back_later),
return_to_sp_cancel_path(step: :get_a_letter, location: :come_back_later),
class: 'usa-button usa-button--big usa-button--wide',
) %>
<% else %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/phone_errors/failure.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
<% end %>
<% end %>
<%= render PageFooterComponent.new do %>
<%= link_to(t('links.cancel'), idv_cancel_path) %>
<%= link_to(t('links.cancel'), idv_cancel_path(step: :phone_error)) %>
<% end %>

2 changes: 1 addition & 1 deletion app/views/idv/session_errors/warning.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
<% end %>

<%= render PageFooterComponent.new do %>
<%= link_to t('links.cancel'), idv_cancel_path %>
<%= link_to t('links.cancel'), idv_cancel_path(step: :invalid_session) %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/idv/shared/_document_capture.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
acuant_version: acuant_version,
sp_name: sp_name,
flow_path: flow_path,
cancel_url: idv_cancel_path,
cancel_url: idv_cancel_path(step: :document_capture),
failure_to_proof_url: failure_to_proof_url,
idv_in_person_url: (IdentityConfig.store.in_person_doc_auth_button_enabled && Idv::InPersonConfig.enabled_for_issuer?(decorated_sp_session.sp_issuer)) ? idv_in_person_url : nil,
security_and_privacy_how_it_works_url: MarketingSite.security_and_privacy_how_it_works_url,
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/unavailable/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<% c.with_action_button(
action: ->(**tag_options, &block) do
link_to(
return_to_sp_failure_to_proof_path(location: :unavailable),
return_to_sp_failure_to_proof_path(step: :unavailable, location: :unavailable),
**tag_options,
&block
)
Expand Down
2 changes: 1 addition & 1 deletion app/views/sign_up/completions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
<% end %>

<%= render PageFooterComponent.new do %>
<%= link_to t('links.cancel'), return_to_sp_cancel_path %>
<%= link_to t('links.cancel'), return_to_sp_cancel_path(step: :sign_up) %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
it 'points the cancel link back to the SP' do
action

expect(assigns[:cancel_url]).to eq(return_to_sp_cancel_path)
expect(assigns[:cancel_url]).to eq(return_to_sp_cancel_path(step: :sms_opt_in))
end
end
end
Expand Down
3 changes: 1 addition & 2 deletions spec/features/idv/doc_auth/redo_document_capture_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,9 @@

it 'shows a troubleshooting option to allow the user to cancel and return to SP' do
click_idv_continue

expect(page).to have_link(
t('links.cancel'),
href: idv_cancel_path,
href: idv_cancel_path(step: :invalid_session),
)

click_link t('links.cancel')
Expand Down
11 changes: 8 additions & 3 deletions spec/features/openid_connect/openid_connect_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,10 @@
expect(page).to have_content(sp_content)

expect(page).to have_link(
t('links.back_to_sp', sp: 'Example iOS App'), href: return_to_sp_cancel_path
t(
'links.back_to_sp',
sp: 'Example iOS App',
), href: return_to_sp_cancel_path(step: :authentication)
)

sign_up_user_from_sp_without_confirming_email(email)
Expand Down Expand Up @@ -835,9 +838,11 @@
context 'going back to the SP' do
it 'links back to the SP from the sign in page' do
visit_idp_from_ial1_oidc_sp(prompt: 'select_account')

expect(page).to have_link(
"‹ #{t('links.back_to_sp', sp: 'Test SP')}", href: return_to_sp_cancel_path
"‹ #{t(
'links.back_to_sp',
sp: 'Test SP',
)}", href: return_to_sp_cancel_path(step: :authentication)
)
end
end
Expand Down
6 changes: 4 additions & 2 deletions spec/features/saml/ial1_sso_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@

it 'shows user the start page with a link back to the SP' do
visit saml_authn_request_url

expect(page).to have_link(
t('links.back_to_sp', sp: 'Your friendly Government Agency'), href: return_to_sp_cancel_path
t(
'links.back_to_sp',
sp: 'Your friendly Government Agency',
), href: return_to_sp_cancel_path(step: :authentication)
)
end

Expand Down
5 changes: 4 additions & 1 deletion spec/features/saml/ial2_sso_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ def sign_out_user
visit saml_authn_request_url

expect(page).to have_link(
t('links.back_to_sp', sp: 'Your friendly Government Agency'), href: return_to_sp_cancel_path
t(
'links.back_to_sp',
sp: 'Your friendly Government Agency',
), href: return_to_sp_cancel_path(step: :authentication)
)
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/features/saml/redirect_uri_validation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
state: '123abc',
)
sp = ServiceProvider.find_by(issuer: 'http://localhost:3000')

expect(page).
to have_link t('links.back_to_sp', sp: sp.friendly_name), href: return_to_sp_cancel_path
to have_link t('links.back_to_sp', sp: sp.friendly_name),
href: return_to_sp_cancel_path(step: :authentication)

fill_in_credentials_and_submit(user.email, user.password)
fill_in_code_with_last_phone_otp
Expand Down
6 changes: 4 additions & 2 deletions spec/features/saml/saml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

it 'returns the user to the acs url after authentication' do
expect(page).
to have_link t('links.back_to_sp', sp: sp.friendly_name), href: return_to_sp_cancel_path
to have_link t('links.back_to_sp', sp: sp.friendly_name),
href: return_to_sp_cancel_path(step: :authentication)

sign_in_via_branded_page(user)
click_submit_default
Expand All @@ -35,7 +36,8 @@

it 'returns the user to the account page after authentication' do
expect(page).
to have_link t('links.back_to_sp', sp: sp.friendly_name), href: return_to_sp_cancel_path
to have_link t('links.back_to_sp', sp: sp.friendly_name),
href: return_to_sp_cancel_path(step: :authentication)

sign_in_via_branded_page(user)
click_submit_default
Expand Down
5 changes: 4 additions & 1 deletion spec/views/devise/sessions/new.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@
render

expect(rendered).to have_link(
t('links.back_to_sp', sp: 'Awesome Application!'), href: return_to_sp_cancel_path
t(
'links.back_to_sp',
sp: 'Awesome Application!',
), href: return_to_sp_cancel_path(step: :authentication)
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
render
expect(rendered).to have_link(
t('idv.cancel.actions.exit', app_name: APP_NAME),
href: return_to_sp_cancel_path(location: :come_back_later),
href: return_to_sp_cancel_path(step: :get_a_letter, location: :come_back_later),
)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/views/idv/phone_errors/failure.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
it 'renders a cancel link' do
expect(rendered).to have_link(
t('links.cancel'),
href: idv_cancel_path,
href: idv_cancel_path(step: :phone_error),
)
end

Expand Down
10 changes: 8 additions & 2 deletions spec/views/idv/session_errors/warning.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
end

it 'shows a cancel link' do
expect(rendered).to have_link(t('links.cancel'), href: idv_cancel_path)
expect(rendered).to have_link(
t('links.cancel'),
href: idv_cancel_path(step: :invalid_session),
)
end

context 'with a nil user_session' do
Expand All @@ -43,7 +46,10 @@
t('idv.warning.attempts_html', count: remaining_attempts),
),
)
expect(rendered).to have_link(t('links.cancel'), href: idv_cancel_path)
expect(rendered).to have_link(
t('links.cancel'),
href: idv_cancel_path(step: :invalid_session),
)
end
end
end
2 changes: 1 addition & 1 deletion spec/views/idv/unavailable/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
it 'links to the right place' do
expect(rendered).to have_link(
t('idv.unavailable.exit_button', app_name: APP_NAME),
href: return_to_sp_failure_to_proof_path(location: 'unavailable'),
href: return_to_sp_failure_to_proof_path(step: 'unavailable', location: 'unavailable'),
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/views/sign_up/completions/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
render
expect(rendered).to have_link(
t('links.cancel'),
href: return_to_sp_cancel_path,
href: return_to_sp_cancel_path(step: :sign_up),
)
end

Expand Down