Skip to content

Commit

Permalink
Merge pull request #2528 from govuk-one-login/PYIC-6736-Strategic-app…
Browse files Browse the repository at this point in the history
…-journey-map

Pyic 6736 strategic app journey map
  • Loading branch information
DanCorderIPV authored Oct 8, 2024
2 parents b8e5556 + 529b204 commit f356928
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 9 deletions.
38 changes: 36 additions & 2 deletions api-tests/features/p2-strategic-app.feature
Original file line number Diff line number Diff line change
@@ -1,33 +1,61 @@
@Build
Feature: M2B Strategic App Journeys

Scenario: MAM journey iphone
Scenario: MAM journey declared iphone
Given I activate the 'strategicApp' feature set
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'identify-device' page response
When I submit an 'appTriage' event
Then I get a 'pyi-triage-select-device' page response
When I submit a 'smartphone' event
Then I get a 'pyi-triage-select-smartphone' page response
When I submit an 'iphone' event
Then I get a 'pyi-triage-mobile-download-app' page response with context 'iphone'

Scenario: MAM journey android
Scenario: MAM journey detected iphone
Given I activate the 'strategicApp' feature set
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'identify-device' page response
When I submit an 'appTriageIphone' event
Then I get a 'pyi-triage-mobile-confirm' page response
When I submit an 'next' event
Then I get a 'pyi-triage-mobile-download-app' page response with context 'iphone'

Scenario: MAM journey declared android
Given I activate the 'strategicApp' feature set
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'identify-device' page response
When I submit an 'appTriage' event
Then I get a 'pyi-triage-select-device' page response
When I submit a 'smartphone' event
Then I get a 'pyi-triage-select-smartphone' page response
When I submit an 'android' event
Then I get a 'pyi-triage-mobile-download-app' page response with context 'android'

Scenario: MAM journey detected android
Given I activate the 'strategicApp' feature set
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'identify-device' page response
When I submit an 'appTriageAndroid' event
Then I get a 'pyi-triage-mobile-confirm' page response
When I submit an 'next' event
Then I get a 'pyi-triage-mobile-download-app' page response with context 'android'

Scenario: MAM journey no compatible smartphone
Given I activate the 'strategicApp' feature set
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'identify-device' page response
When I submit an 'appTriage' event
Then I get a 'pyi-triage-select-device' page response
When I submit a 'smartphone' event
Then I get a 'pyi-triage-select-smartphone' page response
Expand All @@ -39,6 +67,8 @@ Feature: M2B Strategic App Journeys
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'identify-device' page response
When I submit an 'appTriage' event
Then I get a 'pyi-triage-select-device' page response
When I submit a 'computer-or-tablet' event
Then I get a 'pyi-triage-select-smartphone' page response
Expand All @@ -50,6 +80,8 @@ Feature: M2B Strategic App Journeys
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'identify-device' page response
When I submit an 'appTriage' event
Then I get a 'pyi-triage-select-device' page response
When I submit a 'computer-or-tablet' event
Then I get a 'pyi-triage-select-smartphone' page response
Expand All @@ -61,6 +93,8 @@ Feature: M2B Strategic App Journeys
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'identify-device' page response
When I submit an 'appTriage' event
Then I get a 'pyi-triage-select-device' page response
When I submit a 'computer-or-tablet' event
Then I get a 'pyi-triage-select-smartphone' page response
Expand Down
1 change: 1 addition & 0 deletions api-tests/src/steps/ipv-steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ Then(
assert.equal(
this.lastJourneyEngineResponse.context,
expectedContext === "null" ? null : expectedContext,
`Expected context ${expectedContext} but got ${this.lastJourneyEngineResponse.context}`,
);

if (clientOAuthSessionIdExists) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@ description: >-
and handover to the appropriate journey type.
entryEvents:
appTriage:
targetState: SELECT_DEVICE_PAGE
appTriageSmartphone:
targetState: MAM_SELECT_SMARTPHONE
appTriageSmartphoneIphone:
targetState: MOBILE_IPHONE_CONFIRM_PAGE
appTriageSmartphoneAndroid:
targetState: MOBILE_ANDROID_CONFIRM_PAGE
targetState: IDENTIFY_DEVICE

nestedJourneyStates:
IDENTIFY_DEVICE:
response:
type: page
pageId: identify-device
events:
appTriage:
targetState: SELECT_DEVICE_PAGE
appTriageIphone:
targetState: MOBILE_IPHONE_CONFIRM_PAGE
appTriageAndroid:
targetState: MOBILE_ANDROID_CONFIRM_PAGE

SELECT_DEVICE_PAGE:
response:
type: page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ states:
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE
targetEntryEvent: appTriage
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ states:
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE
targetEntryEvent: appTriage
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,29 @@ states:
events:
appTriage:
targetState: CRI_DCMAW
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE
checkIfDisabled:
dcmaw:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
end:
targetJourney: INELIGIBLE
targetState: INELIGIBLE

STRATEGIC_APP_TRIAGE:
nestedJourney: STRATEGIC_APP_TRIAGE
exitEvents:
next:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
end:
targetJourney: INELIGIBLE
targetState: INELIGIBLE
multipleDocCheckPage:
targetJourney: INELIGIBLE
targetState: INELIGIBLE

CRI_DCMAW:
response:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ states:
events:
next:
targetState: DCMAW_GIVEN_ONLY
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE
targetEntryEvent: appTriage

RESET_IDENTITY_FAMILY_ONLY:
response:
Expand All @@ -185,6 +189,10 @@ states:
events:
next:
targetState: DCMAW_FAMILY_ONLY
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE
targetEntryEvent: appTriage

DCMAW_GIVEN_ONLY:
response:
Expand Down Expand Up @@ -341,6 +349,10 @@ states:
events:
next:
targetState: DCMAW_GIVEN_WITH_ADDRESS
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE
targetEntryEvent: appTriage

RESET_IDENTITY_FAMILY_WITH_ADDRESS:
response:
Expand All @@ -351,6 +363,10 @@ states:
events:
next:
targetState: DCMAW_FAMILY_WITH_ADDRESS
checkFeatureFlag:
strategicAppEnabled:
targetState: STRATEGIC_APP_TRIAGE
targetEntryEvent: appTriage

DCMAW_GIVEN_WITH_ADDRESS:
response:
Expand Down Expand Up @@ -430,6 +446,21 @@ states:
targetJourney: FAILED
targetState: FAILED_CONFIRM_DETAILS

# Once the `next` event here is developed it's likely that we'll need to split this into four separate sub-journey
# instantiations.
STRATEGIC_APP_TRIAGE:
nestedJourney: STRATEGIC_APP_TRIAGE
exitEvents:
next:
targetJourney: TECHNICAL_ERROR
targetState: ERROR
end:
targetJourney: FAILED
targetState: FAILED_UPDATE_DETAILS
multipleDocCheckPage:
targetJourney: TECHNICAL_ERROR
targetState: ERROR

# SHARED STATES

CHECK_COI_GIVEN:
Expand Down

0 comments on commit f356928

Please sign in to comment.