Skip to content

Commit

Permalink
PYIC-7832: Add back original states + fail routing and context
Browse files Browse the repository at this point in the history
Keep original states for now so it does not break any exisiting journeys, will be removed in follow up PR
We need to version of the new route, one with the context dropout
  • Loading branch information
AmritSidhu committed Jan 15, 2025
1 parent 445bccd commit 214a414
Show file tree
Hide file tree
Showing 7 changed files with 223 additions and 9 deletions.
2 changes: 1 addition & 1 deletion api-tests/features/disabled-cri-journeys.feature
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Feature: Disabled CRI journeys
When I submit 'kenneth-score-0' details with attributes to the CRI stub
| Attribute | Values |
| evidence_requested | {"scoringPolicy":"gpg45","verificationScore":2} |
Then I get a 'photo-id-security-questions-find-another-way' page response
Then I get a 'photo-id-security-questions-find-another-way' page response with context 'dropout'
When I submit an 'appTriage' event
Then I get a 'pyi-technical' page response

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Feature: Authoritative source checks with driving licence CRI
When I submit 'kenneth-score-0' details with attributes to the CRI stub
| Attribute | Values |
| evidence_requested | {"scoringPolicy":"gpg45","verificationScore":2} |
Then I get a 'photo-id-security-questions-find-another-way' page response
Then I get a 'photo-id-security-questions-find-another-way' page response with context 'dropout'
When I submit an 'appTriage' event
Then I get a 'dcmaw' CRI response
When I submit 'kenneth-driving-permit-valid' details to the CRI stub
Expand Down
2 changes: 1 addition & 1 deletion api-tests/features/p1-journeys.feature
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Feature: P1 journey
When I submit 'kenneth-score-0' details with attributes to the CRI stub
| Attribute | Values |
| evidence_requested | {"scoringPolicy":"gpg45","verificationScore":1} |
Then I get a 'photo-id-security-questions-find-another-way' page response
Then I get a 'photo-id-security-questions-find-another-way' page response with context 'dropout'

Scenario: P1 unsuccessful KBV questions for low confidence users with photo ID
Given I activate the 'p1Journeys' feature set
Expand Down
6 changes: 3 additions & 3 deletions api-tests/features/p2-web-journey.feature
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Feature: P2 Web document journey
When I submit a 'next' event
Then I get a 'page-pre-dwp-kbv-transition' page response
When I submit a 'end' event
Then I get a 'photo-id-security-questions-find-another-way' page response
Then I get a 'photo-id-security-questions-find-another-way' page response with context 'dropout'
When I submit an 'appTriage' event
Then I get a 'dcmaw' CRI response
When I submit 'kenneth-driving-permit-valid' details to the CRI stub
Expand Down Expand Up @@ -301,7 +301,7 @@ Feature: P2 Web document journey
When I submit 'kenneth-score-0' details with attributes to the CRI stub
| Attribute | Values |
| evidence_requested | {"scoringPolicy":"gpg45","verificationScore":2} |
Then I get a 'photo-id-security-questions-find-another-way' page response
Then I get a 'photo-id-security-questions-find-another-way' page response with context 'dropout'
When I submit an 'f2f' event
Then I get a 'f2f' CRI response
When I submit 'kenneth-passport-valid' details with attributes to the async CRI stub
Expand All @@ -320,7 +320,7 @@ Feature: P2 Web document journey
When I submit 'kenneth-score-0' details with attributes to the CRI stub
| Attribute | Values |
| evidence_requested | {"scoringPolicy":"gpg45","verificationScore":2} |
Then I get a 'photo-id-security-questions-find-another-way' page response
Then I get a 'photo-id-security-questions-find-another-way' page response with context 'dropout'
When I submit an 'appTriage' event
Then I get a 'dcmaw' CRI response
When I call the CRI stub and get an 'access_denied' OAuth error
Expand Down
2 changes: 1 addition & 1 deletion api-tests/features/return-codes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Feature: Return exit codes
When I submit 'kenneth-score-0' details with attributes to the CRI stub
| Attribute | Values |
| evidence_requested | {"scoringPolicy":"gpg45","verificationScore":2} |
Then I get a 'photo-id-security-questions-find-another-way' page response
Then I get a 'photo-id-security-questions-find-another-way' page response with context 'dropout'
When I submit a 'f2f' event
Then I get a 'f2f' CRI response
When I call the CRI stub with attributes and get an 'access_denied' OAuth error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ states:
response:
type: page
pageId: photo-id-security-questions-find-another-way
context: dropout
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
Expand All @@ -306,6 +307,44 @@ states:
targetJourney: TECHNICAL_ERROR
targetState: ERROR

PYI_CRI_ESCAPE:
response:
type: page
pageId: pyi-cri-escape
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
f2f:
targetJourney: F2F_HAND_OFF
targetState: START

PYI_CRI_ESCAPE_NO_F2F:
response:
type: page
pageId: pyi-cri-escape-no-f2f
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
end:
targetJourney: INELIGIBLE
targetState: INELIGIBLE_SKIP_MESSAGE

# Common pages
KBV_PHOTO_ID:
nestedJourney: KBVS
Expand All @@ -321,7 +360,7 @@ states:
processCandidateIdentity:
targetState: PROCESS_NEW_IDENTITY
enhanced-verification:
targetState: PYI_KBV_DROPOUT_PHOTO_ID
targetState: MITIGATION_KBV_FAIL_PHOTO_ID
auditEvents:
- IPV_MITIGATION_START
auditContext:
Expand Down Expand Up @@ -450,6 +489,10 @@ states:
f2f:
targetJourney: F2F_HAND_OFF
targetState: START
checkIfDisabled:
f2f:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
Expand Down Expand Up @@ -500,6 +543,10 @@ states:
f2f:
targetJourney: F2F_HAND_OFF
targetState: START
checkIfDisabled:
f2f:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
Expand Down Expand Up @@ -617,6 +664,24 @@ states:
targetState: INELIGIBLE

# Mitigation journey (02)
MITIGATION_02_OPTIONS:
response:
type: page
pageId: pyi-suggest-other-options-no-f2f
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
end:
targetJourney: INELIGIBLE
targetState: INELIGIBLE

STRATEGIC_APP_TRIAGE_PYI_ESCAPE:
nestedJourney: STRATEGIC_APP_TRIAGE
Expand Down Expand Up @@ -683,6 +748,48 @@ states:
processCandidateIdentity:
targetState: PROCESS_INCOMPLETE_IDENTITY

MITIGATION_02_OPTIONS_WITH_F2F:
response:
type: page
pageId: pyi-suggest-other-options
events:
f2f:
targetJourney: F2F_HAND_OFF
targetState: START
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR

MITIGATION_KBV_FAIL_PHOTO_ID:
response:
type: page
pageId: photo-id-security-questions-find-another-way
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
f2f:
targetJourney: F2F_HAND_OFF
targetState: START
checkIfDisabled:
f2f:
targetJourney: TECHNICAL_ERROR
targetState: ERROR

PYI_POST_OFFICE:
response:
type: page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ states:
response:
type: page
pageId: photo-id-security-questions-find-another-way
context: dropout
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
Expand All @@ -339,6 +340,44 @@ states:
targetJourney: TECHNICAL_ERROR
targetState: ERROR

PYI_CRI_ESCAPE:
response:
type: page
pageId: pyi-cri-escape
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
f2f:
targetJourney: F2F_HAND_OFF
targetState: START

PYI_CRI_ESCAPE_NO_F2F:
response:
type: page
pageId: pyi-cri-escape-no-f2f
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
end:
targetJourney: INELIGIBLE
targetState: INELIGIBLE_SKIP_MESSAGE

# Common pages
KBV_PHOTO_ID:
nestedJourney: KBVS
Expand All @@ -354,7 +393,7 @@ states:
processCandidateIdentity:
targetState: PROCESS_NEW_IDENTITY
enhanced-verification:
targetState: PYI_KBV_DROPOUT_PHOTO_ID
targetState: MITIGATION_KBV_FAIL_PHOTO_ID
auditEvents:
- IPV_MITIGATION_START
auditContext:
Expand Down Expand Up @@ -497,6 +536,10 @@ states:
f2f:
targetJourney: F2F_HAND_OFF
targetState: START
checkIfDisabled:
f2f:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
Expand Down Expand Up @@ -560,6 +603,10 @@ states:
f2f:
targetJourney: F2F_HAND_OFF
targetState: START
checkIfDisabled:
f2f:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
Expand Down Expand Up @@ -677,6 +724,24 @@ states:
targetState: INELIGIBLE

# Mitigation journey (02)
MITIGATION_02_OPTIONS:
response:
type: page
pageId: pyi-suggest-other-options-no-f2f
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
end:
targetJourney: INELIGIBLE
targetState: INELIGIBLE

STRATEGIC_APP_TRIAGE_PYI_ESCAPE:
nestedJourney: STRATEGIC_APP_TRIAGE
Expand Down Expand Up @@ -743,6 +808,48 @@ states:
processCandidateIdentity:
targetState: PROCESS_INCOMPLETE_IDENTITY

MITIGATION_02_OPTIONS_WITH_F2F:
response:
type: page
pageId: pyi-suggest-other-options
events:
f2f:
targetJourney: F2F_HAND_OFF
targetState: START
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR

MITIGATION_KBV_FAIL_PHOTO_ID:
response:
type: page
pageId: photo-id-security-questions-find-another-way
events:
appTriage:
targetState: APP_DOC_CHECK_PYI_ESCAPE
targetEntryEvent: next
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE_PYI_ESCAPE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
f2f:
targetJourney: F2F_HAND_OFF
targetState: START
checkIfDisabled:
f2f:
targetJourney: TECHNICAL_ERROR
targetState: ERROR

PYI_POST_OFFICE:
response:
type: page
Expand Down

0 comments on commit 214a414

Please sign in to comment.