Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
_feature means have not re-written it, new steps in step_definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Tewskbury authored and Marcus Tewskbury committed Aug 12, 2017
1 parent f884e7e commit 0a68e31
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 44 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
67 changes: 23 additions & 44 deletions features/identity_post.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@identity @identity_post
@identity @identity_post @e2e
Feature: upsert identity
Whenever data is received about a user
whether from external source
Expand All @@ -17,46 +17,25 @@ Feature: upsert identity
Event
Dialog

Background:
Given there are Identity records as follows:
| identityKey |
| TIN_RECORD |
| BRONZE_RECORD |
| GOLD_RECORD |

@acceptance
Scenario: Update received for Identity "custom" field
When an Identity update is received for a non-matching field
Then upsert an Identity tin record
And push update to all medal Identity views
And push Identity rollup to related services

Scenario: Updare received for Identity "match" field
When an Identity update is received with "email"
Then review medal match when upserting an Identity tin record
And push update to all medal Identity views
And push impacted Identity rollup to related services

Scenario: Updare received for Identity "match" field
When an Identity update is received with "phone + first"
Then review medal match when upserting an Identity tin record
And push update to all medal Identity views
And push impacted Identity rollup to related services

Scenario: Updare received for Identity "match" field
When an Identity update is received with "browserId"
Then review medal match when upserting an Identity tin record
And push update to all medal Identity views
And push impacted Identity rollup to related services

Scenario: Updare received for Identity "match" field
When an Identity update is received with "p + pid"
Then review medal match when upserting an Identity tin record
And push update to all medal Identity views
And push impacted Identity rollup to related services

Scenario: Updare received for Identity "match" field
When an Identity update is received with "foreignId"
Then review medal match when upserting an Identity tin record
And push update to all medal Identity views
And push impacted Identity rollup to related services
#Non-Matching Scenarios
Scenario: unmatchable update received for existing identity
Given a number of related, but unmatched identity records exist
When an unmatchable update is received for that identity
Then upsert identity

Scenario: unmatchable update received for new identity
Given no records exist that match the new identity
When an unmatchable update is received for that identity
Then upsert identity

#Matching Scenarios
Scenario: matchable update received for existing identity
Given there is a number of related, but unmatched identity records
And existing identity records have associated events
When a matchable update is received for that identity
Then upsert identity

Scenario: matchable update received for existing identity
Given no records exist that match the new identity
When a matchable update is received for that identity
Then upsert identity
42 changes: 42 additions & 0 deletions features/step_definitions/step_definitions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
this.Given(/^no records exist that match the new identity:$/, function (table, callback) {
this.connect(callback);
//1. create a random new Tin record
//https://app.swaggerhub.com/apis/uTu.ai/identity-public/1.0.0
});

this.Given(/^a number of related, but unmatched identity records exist:$/, function (table, callback) {
this.connect(callback);
//1. create 3x new tin records. Do not provide any matching criteria between them
// but know, they are for the same person ultimately.
// can this be fed from the data sets? the nuance of the data combinations is
// in the medaling spreadsheet.
});

this.Given(/^existing identity records have associated events:$/, function (table, callback) {
this.connect(callback);
//1. for any identity records just created, go ahead and create some bogus events for them.
});

this.When(/^an unmatchable update is received for that identity:$/, function (table, callback) {
this.connect(callback);
//1. try updating any identity {custom} field
});

this.When(/^a matchable update is received for that identity:$/, function (table, callback) {
this.connect(callback);
// create an identity update that includes email
// create an identity update that includes browserId
// etc.
// same point as the given really. There are MANY combinations that could be tested here
// where and how do these combinations get inputted?

this.Then(/^upsert identity:$/, function (table, callback) {
this.connect(callback);
// there should exist a singular tin record that reflects recent update
// there should exist a singular bronze record that reflects recent update
// there should exist a singular gold record that reflects recent update
// if a new match was made across existing identity records, the combination
// of data - the merge - should be reflected in the bronze and gold records
// this final identity view should be denorm'd to related events

});

0 comments on commit 0a68e31

Please sign in to comment.