diff --git a/api-tests/features/disabled-cri-journeys.feature b/api-tests/features/disabled-cri-journeys.feature index 3a56546911..e084faef73 100644 --- a/api-tests/features/disabled-cri-journeys.feature +++ b/api-tests/features/disabled-cri-journeys.feature @@ -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 diff --git a/api-tests/features/dl-auth-source-checks/dl-auth-source-checks.feature b/api-tests/features/dl-auth-source-checks/dl-auth-source-checks.feature index 4fe9e02ca7..db88c6b033 100644 --- a/api-tests/features/dl-auth-source-checks/dl-auth-source-checks.feature +++ b/api-tests/features/dl-auth-source-checks/dl-auth-source-checks.feature @@ -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 diff --git a/api-tests/features/p1-journeys.feature b/api-tests/features/p1-journeys.feature index 99306d13aa..2800b1bcbe 100644 --- a/api-tests/features/p1-journeys.feature +++ b/api-tests/features/p1-journeys.feature @@ -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 diff --git a/api-tests/features/p2-web-journey.feature b/api-tests/features/p2-web-journey.feature index 1d85eb6f6b..2b23bdc6b1 100644 --- a/api-tests/features/p2-web-journey.feature +++ b/api-tests/features/p2-web-journey.feature @@ -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 @@ -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 @@ -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 diff --git a/api-tests/features/return-codes.feature b/api-tests/features/return-codes.feature index c5805ce17c..66535dd6af 100644 --- a/api-tests/features/return-codes.feature +++ b/api-tests/features/return-codes.feature @@ -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 diff --git a/lambdas/process-journey-event/src/main/resources/statemachine/journey-maps/new-p1-identity.yaml b/lambdas/process-journey-event/src/main/resources/statemachine/journey-maps/new-p1-identity.yaml index a55fe6672f..61e5f448e2 100644 --- a/lambdas/process-journey-event/src/main/resources/statemachine/journey-maps/new-p1-identity.yaml +++ b/lambdas/process-journey-event/src/main/resources/statemachine/journey-maps/new-p1-identity.yaml @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/lambdas/process-journey-event/src/main/resources/statemachine/journey-maps/new-p2-identity.yaml b/lambdas/process-journey-event/src/main/resources/statemachine/journey-maps/new-p2-identity.yaml index 31e8b9fd4e..2cef3e5053 100644 --- a/lambdas/process-journey-event/src/main/resources/statemachine/journey-maps/new-p2-identity.yaml +++ b/lambdas/process-journey-event/src/main/resources/statemachine/journey-maps/new-p2-identity.yaml @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 @@ -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