-
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.
Namespace journey to EarlyYearsPayment::Provider
Change the journey from EarlyYearsPayment to EarlyYearsPayment::Provider since there will be a second journey relating to the practitioner answers
- Loading branch information
1 parent
81b4bb4
commit 7d85bdf
Showing
21 changed files
with
117 additions
and
103 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 was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
app/models/journeys/early_years_payment/eligibility_checker.rb
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
extend Base | ||
extend self | ||
|
||
ROUTING_NAME = "early-years-payment-provider" | ||
VIEW_PATH = "early_years_payment/provider" | ||
I18N_NAMESPACE = "early_years_payment_provider" | ||
POLICIES = [Policies::EarlyYearsPayment] | ||
FORMS = { | ||
"claims" => {} | ||
} | ||
end | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
app/models/journeys/early_years_payment/provider/eligibility_checker.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,8 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class EligibilityChecker < Journeys::EligibilityChecker | ||
end | ||
end | ||
end | ||
end |
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,9 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class Session < Journeys::Session | ||
attribute :answers, SessionAnswersType.new | ||
end | ||
end | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
app/models/journeys/early_years_payment/provider/session_answers.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,11 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class SessionAnswers < Journeys::SessionAnswers | ||
def policy | ||
Policies::EarlyYearsPayment | ||
end | ||
end | ||
end | ||
end | ||
end |
7 changes: 7 additions & 0 deletions
7
app/models/journeys/early_years_payment/provider/session_answers_type.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,7 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class SessionAnswersType < ::Journeys::SessionAnswersType; end | ||
end | ||
end | ||
end |
42 changes: 42 additions & 0 deletions
42
app/models/journeys/early_years_payment/provider/slug_sequence.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,42 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class SlugSequence | ||
ELIGIBILITY_SLUGS = %w[].freeze | ||
|
||
PERSONAL_DETAILS_SLUGS = %w[].freeze | ||
|
||
PAYMENT_DETAILS_SLUGS = %w[].freeze | ||
|
||
RESULTS_SLUGS = %w[].freeze | ||
|
||
SLUGS = ( | ||
ELIGIBILITY_SLUGS + | ||
PERSONAL_DETAILS_SLUGS + | ||
PAYMENT_DETAILS_SLUGS + | ||
RESULTS_SLUGS | ||
).freeze | ||
|
||
def self.start_page_url | ||
if Rails.env.production? | ||
"https://www.example.com" # TODO: update to correct guidance | ||
else | ||
Rails.application.routes.url_helpers.landing_page_path("early-years-payment-provider") | ||
end | ||
end | ||
|
||
attr_reader :journey_session | ||
|
||
delegate :answers, to: :journey_session | ||
|
||
def initialize(journey_session) | ||
@journey_session = journey_session | ||
end | ||
|
||
def slugs | ||
SLUGS | ||
end | ||
end | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
app/models/journeys/early_years_payment/session_answers_type.rb
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1044,8 +1044,10 @@ en: | |
By submitting this you are confirming that, to the best of your knowledge, the details you are providing are | ||
correct. | ||
btn_text: Accept and send | ||
early_years_payment: | ||
journey_name: Claim an early years financial incentive payment | ||
early_years_payment_provider: | ||
journey_name: Claim an early years financial incentive payment - provider | ||
landing_page: | ||
title: Claim an early years financial incentive payment | ||
feedback_email: "[email protected]" | ||
activerecord: | ||
errors: | ||
|
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 was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
spec/features/early_years_payment/provider/happy_path_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,10 @@ | ||
require "rails_helper" | ||
|
||
RSpec.feature "Early years payment provider" do | ||
scenario "happy path claim" do | ||
when_early_years_payment_provider_journey_configuration_exists | ||
|
||
visit landing_page_path(Journeys::EarlyYearsPayment::Provider::ROUTING_NAME) | ||
expect(page).to have_link("Start now") | ||
end | ||
end |
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