From 0a68e318681eef69858d31cd5caa87669a69a133 Mon Sep 17 00:00:00 2001 From: Marcus Tewskbury Date: Sat, 12 Aug 2017 04:02:12 -0400 Subject: [PATCH] _feature means have not re-written it, new steps in step_definitions --- ...bot_apiKey.feature => _bot_apiKey.feature} | 0 .../{bot_crud.feature => _bot_crud.feature} | 0 ...stom_algo.feature => _custom_algo.feature} | 0 ...alog_crud.feature => _dialog_crud.feature} | 0 ...alog_link.feature => _dialog_link.feature} | 0 ...event_crud.feature => _event_crud.feature} | 0 ...t_import.feature => _event_import.feature} | 0 ...event_post.feature => _event_post.feature} | 0 ..._alias.feature => _identity_alias.feature} | 0 ...ty_crud.feature => _identity_crud.feature} | 0 ...tity_get.feature => _identity_get.feature} | 0 ...sion.feature => _identity_session.feature} | 0 ...erId.feature => _makenu_browserId.feature} | 0 ...nu_click.feature => _makenu_click.feature} | 0 ...nu_pixel.feature => _makenu_pixel.feature} | 0 ...age_post.feature => _message_post.feature} | 0 features/identity_post.feature | 67 +++++++------------ features/step_definitions/step_definitions.js | 42 ++++++++++++ 18 files changed, 65 insertions(+), 44 deletions(-) rename features/{bot_apiKey.feature => _bot_apiKey.feature} (100%) rename features/{bot_crud.feature => _bot_crud.feature} (100%) rename features/{custom_algo.feature => _custom_algo.feature} (100%) rename features/{dialog_crud.feature => _dialog_crud.feature} (100%) rename features/{dialog_link.feature => _dialog_link.feature} (100%) rename features/{event_crud.feature => _event_crud.feature} (100%) rename features/{event_import.feature => _event_import.feature} (100%) rename features/{event_post.feature => _event_post.feature} (100%) rename features/{identity_alias.feature => _identity_alias.feature} (100%) rename features/{identity_crud.feature => _identity_crud.feature} (100%) rename features/{identity_get.feature => _identity_get.feature} (100%) rename features/{identity_session.feature => _identity_session.feature} (100%) rename features/{makenu_browserId.feature => _makenu_browserId.feature} (100%) rename features/{makenu_click.feature => _makenu_click.feature} (100%) rename features/{makenu_pixel.feature => _makenu_pixel.feature} (100%) rename features/{message_post.feature => _message_post.feature} (100%) create mode 100644 features/step_definitions/step_definitions.js diff --git a/features/bot_apiKey.feature b/features/_bot_apiKey.feature similarity index 100% rename from features/bot_apiKey.feature rename to features/_bot_apiKey.feature diff --git a/features/bot_crud.feature b/features/_bot_crud.feature similarity index 100% rename from features/bot_crud.feature rename to features/_bot_crud.feature diff --git a/features/custom_algo.feature b/features/_custom_algo.feature similarity index 100% rename from features/custom_algo.feature rename to features/_custom_algo.feature diff --git a/features/dialog_crud.feature b/features/_dialog_crud.feature similarity index 100% rename from features/dialog_crud.feature rename to features/_dialog_crud.feature diff --git a/features/dialog_link.feature b/features/_dialog_link.feature similarity index 100% rename from features/dialog_link.feature rename to features/_dialog_link.feature diff --git a/features/event_crud.feature b/features/_event_crud.feature similarity index 100% rename from features/event_crud.feature rename to features/_event_crud.feature diff --git a/features/event_import.feature b/features/_event_import.feature similarity index 100% rename from features/event_import.feature rename to features/_event_import.feature diff --git a/features/event_post.feature b/features/_event_post.feature similarity index 100% rename from features/event_post.feature rename to features/_event_post.feature diff --git a/features/identity_alias.feature b/features/_identity_alias.feature similarity index 100% rename from features/identity_alias.feature rename to features/_identity_alias.feature diff --git a/features/identity_crud.feature b/features/_identity_crud.feature similarity index 100% rename from features/identity_crud.feature rename to features/_identity_crud.feature diff --git a/features/identity_get.feature b/features/_identity_get.feature similarity index 100% rename from features/identity_get.feature rename to features/_identity_get.feature diff --git a/features/identity_session.feature b/features/_identity_session.feature similarity index 100% rename from features/identity_session.feature rename to features/_identity_session.feature diff --git a/features/makenu_browserId.feature b/features/_makenu_browserId.feature similarity index 100% rename from features/makenu_browserId.feature rename to features/_makenu_browserId.feature diff --git a/features/makenu_click.feature b/features/_makenu_click.feature similarity index 100% rename from features/makenu_click.feature rename to features/_makenu_click.feature diff --git a/features/makenu_pixel.feature b/features/_makenu_pixel.feature similarity index 100% rename from features/makenu_pixel.feature rename to features/_makenu_pixel.feature diff --git a/features/message_post.feature b/features/_message_post.feature similarity index 100% rename from features/message_post.feature rename to features/_message_post.feature diff --git a/features/identity_post.feature b/features/identity_post.feature index 1deb2a5..e44c4f2 100644 --- a/features/identity_post.feature +++ b/features/identity_post.feature @@ -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 @@ -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 diff --git a/features/step_definitions/step_definitions.js b/features/step_definitions/step_definitions.js new file mode 100644 index 0000000..f3764ef --- /dev/null +++ b/features/step_definitions/step_definitions.js @@ -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 + +});