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

[LUPEYALPHA-981] [LUPEYALPHA-994] Add One Login to EY practitioner journey #3241

Merged
merged 3 commits into from
Oct 1, 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 @@ -11,7 +11,10 @@ class FindReferenceForm < Form
def save
return false if invalid?

journey_session.answers.assign_attributes(reference_number:)
journey_session.answers.assign_attributes(
reference_number:,
start_email: email
)
journey_session.save!
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module EarlyYearsPayment
module Practitioner
class SessionAnswers < Journeys::SessionAnswers
attribute :reference_number, :string
attribute :start_email, :string

def policy
Policies::EarlyYearsPayments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Practitioner
class SlugSequence
SLUGS = %w[
find-reference
one-login-sign-in
sign-in
how-we-use-your-information
personal-details
enter-home-address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= form_with model: @form, url: claim_path(current_journey_routing_name, request.query_parameters), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
<%= f.govuk_error_summary %>

<%= f.hidden_field :email, value: params[:email] %>
<%= f.hidden_field :email, value: (params[:email] || journey_session.answers.attributes["start_email"]) %>

<h1 class="govuk-heading-l">
<%= @form.t(:question) %>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
fill_in "Claim reference number", with: claim.reference
click_button "Submit"

expect(page).to have_content "login page goes here"
expect(page).to have_content "Sign in with GOV.UK One Login"
click_link "Back"

expect(page).to have_content "Track your application"
fill_in "Claim reference number", with: claim.reference
click_button "Submit"
expect(page).to have_content "Sign in with GOV.UK One Login"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
fill_in "Claim reference number", with: claim.reference
click_button "Submit"

expect(page).to have_content "one login page goes here"
expect(page).to have_content "Sign in with GOV.UK One Login"
click_on "Continue"

expect(page).to have_content "You have successfully signed in to GOV.UK One Login"
click_on "Continue"

expect(page).to have_content "You have successfully proved your identity with GOV.UK One Login"
click_on "Continue"

expect(page.title).to have_text("How we’ll use the information you provide")
Expand Down