-
Notifications
You must be signed in to change notification settings - Fork 16
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-941] Add ineligibility screen for users not on whitelist #3140
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b19f313
Add ineligibility screen when users enter an email address not on the…
vacabor 09e4fec
Merge branch 'master' into LUPEYALPHA-941-email-not-on-whitelist
vacabor cd53c2c
Use feedback email while we wait for correct email address
vacabor 1756dae
Merge branch 'master' into LUPEYALPHA-941-email-not-on-whitelist
vacabor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
13 changes: 13 additions & 0 deletions
13
.../early_years_payment/provider/start/claims/_ineligibility_email_not_on_whitelist.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,13 @@ | ||
<% content_for(:page_title, page_title("You do not have access to this service", journey: current_journey_routing_name)) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h1 class="govuk-heading-l">You do not have access to this service</h1> | ||
<p class="govuk-body"> | ||
This email address does not have access to this service. Check the email address you entered and try again. | ||
</p> | ||
<p class="govuk-body"> | ||
To request access, contact us at <a href="mailto:[email protected]">[email protected]</a>. | ||
</p> | ||
</div> | ||
</div> |
2 changes: 2 additions & 0 deletions
2
app/views/early_years_payment/provider/start/claims/ineligible.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,2 @@ | ||
<% ineligibility_reason = Journeys::EarlyYearsPayment::Provider::Start::EligibilityChecker.new(journey_session:).ineligibility_reason %> | ||
<%= render "ineligibility_#{ineligibility_reason}" %> |
41 changes: 41 additions & 0 deletions
41
spec/features/early_years_payment/provider/start/ineligible_email_spec.rb
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,41 @@ | ||
require "rails_helper" | ||
|
||
RSpec.feature "Early years payment provider" do | ||
let(:journey_session) { Journeys::EarlyYearsPayment::Provider::Start::Session.last } | ||
|
||
scenario "entering an email address which is not on the whitelist" do | ||
when_early_years_payment_provider_start_journey_configuration_exists | ||
when_eligible_ey_provider_exists | ||
|
||
visit landing_page_path(Journeys::EarlyYearsPayment::Provider::Start::ROUTING_NAME) | ||
click_link "Start now" | ||
|
||
expect(page.title).to have_text("Enter your email address") | ||
expect(page).to have_content("Enter your email address") | ||
fill_in "Email address", with: "[email protected]" | ||
click_on "Submit" | ||
|
||
expect(page.title).to have_text("You do not have access to this service") | ||
expect(page).to have_content("You do not have access to this service") | ||
expect(page).to have_content("This email address does not have access to this service. Check the email address you entered and try again.") | ||
expect(page).not_to have_css ".govuk-notification-banner--success" | ||
end | ||
|
||
scenario "entering an email address which is not valid" do | ||
when_early_years_payment_provider_start_journey_configuration_exists | ||
when_eligible_ey_provider_exists | ||
|
||
visit landing_page_path(Journeys::EarlyYearsPayment::Provider::Start::ROUTING_NAME) | ||
click_link "Start now" | ||
|
||
expect(page.title).to have_text("Enter your email address") | ||
expect(page).to have_content("Enter your email address") | ||
fill_in "Email address", with: "invalidemailaddress" | ||
click_on "Submit" | ||
|
||
expect(page.title).to have_text("You do not have access to this service") | ||
expect(page).to have_content("You do not have access to this service") | ||
expect(page).to have_content("This email address does not have access to this service. Check the email address you entered and try again.") | ||
expect(page).not_to have_css ".govuk-notification-banner--success" | ||
end | ||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
support_email_address
doesn't exist currently for early_years_payment_provider_start - is it supposed to be the same as thefeedback_email
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - the correct email address is still being provisoned but I will move to this approach in the code :)