-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EY practitioner email address and verification
- Loading branch information
Showing
11 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/views/additional_payments/reminders/email_verification.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<% content_for(:page_title, page_title(t("one_time_password.title"), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> | ||
|
||
<%= render partial: "reminders/one_time_password", locals: {current_journey_routing_name: current_journey_routing_name} %> | ||
<%= render partial: "reminders/one_time_password", locals: {current_journey_routing_name: current_journey_routing_name, show_caption: true} %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 24 additions & 1 deletion
25
app/views/early_years_payment/practitioner/claims/email_address.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,24 @@ | ||
<p class="govuk-body">email address page goes here</p> | ||
<% content_for(:page_title, page_title("Your email address", journey: current_journey_routing_name, show_error: @form.errors.any?)) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<%= f.govuk_text_field :email_address, | ||
autocomplete: "email", | ||
spellcheck: "false", | ||
label: { | ||
text: @form.t("label"), | ||
tag: "h1", | ||
size: "l" | ||
}, | ||
hint: -> do %> | ||
<p><%= @form.t("hint1") %></p> | ||
<p><%= @form.t("hint2") %></p> | ||
<% end %> | ||
|
||
<%= f.govuk_submit %> | ||
<% end %> | ||
</div> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
app/views/early_years_payment/practitioner/claims/email_verification.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<% content_for( | ||
:page_title, | ||
page_title( | ||
t("one_time_password.title"), | ||
journey: current_journey_routing_name, | ||
show_error: @form.errors.any? | ||
) | ||
) %> | ||
|
||
<%= render( | ||
partial: "one_time_password", | ||
locals: { | ||
form: @form, | ||
current_journey_routing_name: current_journey_routing_name, | ||
email_or_mobile: "email", | ||
email_or_text_message: "an email", | ||
show_caption: false | ||
} | ||
) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1401,6 +1401,11 @@ en: | |
journey_name: Claim an early years financial incentive payment - practitioner | ||
feedback_email: [email protected] | ||
claim_description: for early years financial incentive payment | ||
forms: | ||
email_address: | ||
label: Your email address | ||
hint1: We’ll use this to update you with progress on your claim. | ||
hint2: We recommend you use a non-work email address in case your circumstances change while we process your claim. | ||
activerecord: | ||
errors: | ||
models: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,5 +34,16 @@ | |
fill_in "County", with: "City of Derby" | ||
fill_in "Postcode", with: "DE22 4BS" | ||
click_on "Continue" | ||
|
||
expect(page.title).to have_text("Your email address") | ||
expect(page).to have_content("Your email address") | ||
fill_in "claim-email-address-field", with: "[email protected]" | ||
click_on "Continue" | ||
|
||
expect(page).to have_content("Enter the 6-digit passcode") | ||
mail = ActionMailer::Base.deliveries.last | ||
otp_in_mail_sent = mail[:personalisation].unparsed_value[:one_time_password] | ||
fill_in "claim-one-time-password-field", with: otp_in_mail_sent | ||
click_on "Confirm" | ||
end | ||
end |