diff --git a/features/dialog/step_definition.js b/features/dialog/step_definition.js index 7acef7f..81c2513 100644 --- a/features/dialog/step_definition.js +++ b/features/dialog/step_definition.js @@ -16,10 +16,7 @@ var restFactory = require("../../rest_factory"); // {"term1": "term1", "prob": ".55"}, // {"term2": "term2", "prob": ".45"}, // ], -// "rawMessage": { -// "body": "stufff...", -// "text": "stufff...", -// }, +// "rawMessage": "green eggs and ham", // "message": "green eggs and ham" // } diff --git a/features/identity/alias_identity.feature b/features/identity/alias_identity.feature index 072eea9..ad855a0 100644 --- a/features/identity/alias_identity.feature +++ b/features/identity/alias_identity.feature @@ -9,6 +9,7 @@ Feature: alias identity Rules: - ... +@for_testing Background: Given there are Identity records as follows: | identityKey | @@ -16,7 +17,7 @@ Background: | BRONZE_RECORD | | GOLD_RECORD | -@acceptance +@acceptance @for_testing Scenario: Alias called for a known identity When an aliased foreignId is received Then review medal match when upserting an Identity tin record diff --git a/features/identity/get_identity.feature b/features/identity/get_identity.feature index 582d8f3..df2e9cd 100644 --- a/features/identity/get_identity.feature +++ b/features/identity/get_identity.feature @@ -1,38 +1,34 @@ @identity @identity_get Feature: Search identity - ... + With proper credentials + return the proper view of an identity + scoped to tin, bronze, gold, or silver Why: - - Both internal and external systems can benefit from the medaled identity views we've stitched and enhanced + - tons of applications of how we could externalize what we know about an identity for 3rd party services Rules: - - ... + - need to be very locked down to make sure we only give access to proper requests. Fatal place for leaks. - Background: - Given there are Identity records as follows +Background: + Given there are Identity records as follows: + | identityKey | + | TIN_RECORD | + | BRONZE_RECORD | + | GOLD_RECORD | + +@acceptance +Scenario Outline: Updare received for Identity "match" field + Given request contains botKey with right access level + When an Identity search request by for type is received + Then return the requested Identity record(s) or an appropriate response - # these are probably a REALLY good example as when to use examples? - @acceptance - Scenario: Request for identity by tinId - Given - When - Then - - @acceptance - Scenario: Request for identity by bot+p+pid - Given - When - Then - - @acceptance - Scenario: Request for identity by email - Given - When - Then - - @acceptance - Scenario: Request for identity by browserId - Given - When - Then - \ No newline at end of file + Examples: + | matchField | medal | + | tinId | tin | + | email | bronze | + | browserId | silver | + | p + pid | gold | + | foreignId | + | phone | + \ No newline at end of file diff --git a/features/identity/identalias.log b/features/identity/identalias.log new file mode 100644 index 0000000..7876ebe --- /dev/null +++ b/features/identity/identalias.log @@ -0,0 +1,57 @@ +Running "jshint:all" (jshint) task +>> 1 file lint free. + +Running "exec:run_cucumber_tests" (exec) task +@identity @identity_post +Feature: alias identity + + One off condition. Used when a known foreignId wants to be applied + directly against a known tin (a.k.a. identityId). + + Why: + - Cross linking match keys is one of the most important things we can do. + + Rules: + - ... + + @for_testing @acceptance @for_testing + Scenario: Alias called for a known identity + Given there are Identity records as follows: + | identityKey  | + | TIN_RECORD  | + | BRONZE_RECORD | + | GOLD_RECORD  | + When an aliased foreignId is received + 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 + +Failures: + +1) Background: + Step: Given there are Identity records as follows: - features/identity/alias_identity.feature:14 + Message: + Multiple step definitions match: + /^there are Identity records as follows:$/ - features/dialog/step_definition.js:25 + /^there are Identity records as follows:$/ - features/event/step_definition.js:24 + /^there are Identity records as follows:$/ - features/identity/step_definition.js:23 + +Warnings: + +1) Scenario: Alias called for a known identity - features/identity/alias_identity.feature:21 + Step: When an aliased foreignId is received - features/identity/alias_identity.feature:22 + Message: + Undefined. Implement with the following snippet: + + this.When(/^an aliased foreignId is received$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +1 scenario (1 ambiguous) +5 steps (1 ambiguous, 1 undefined, 3 skipped) +0m00.000s +>> Exited with code: 1. +Warning: Task "exec:run_cucumber_tests" failed. Use --force to continue. + +Aborted due to warnings. diff --git a/features/identity/identget.log b/features/identity/identget.log new file mode 100644 index 0000000..cfefdf5 --- /dev/null +++ b/features/identity/identget.log @@ -0,0 +1,232 @@ +Running "jshint:all" (jshint) task +>> 1 file lint free. + +Running "exec:run_cucumber_tests" (exec) task +@identity @identity_get +Feature: Search identity + + With proper credentials + return the proper view of an identity + scoped to tin, bronze, gold, or silver + + Why: + - tons of applications of how we could externalize what we know about an identity for 3rd party services + + Rules: + - need to be very locked down to make sure we only give access to proper requests. Fatal place for leaks. + + @for_testing @acceptance @for_testing @identity @identity_get + Scenario Outline: Updare received for Identity "match" field + Given there are Identity records as follows: + | identityKey  | + | TIN_RECORD  | + | BRONZE_RECORD | + | GOLD_RECORD  | + Given request contains botKey with right access level + When an Identity search request by tinId for tin is received + Then return the requested Identity record(s) or an appropriate response + + @for_testing @acceptance @for_testing @identity @identity_get + Scenario Outline: Updare received for Identity "match" field + Given there are Identity records as follows: + | identityKey  | + | TIN_RECORD  | + | BRONZE_RECORD | + | GOLD_RECORD  | + Given request contains botKey with right access level + When an Identity search request by email for bronze is received + Then return the requested Identity record(s) or an appropriate response + + @for_testing @acceptance @for_testing @identity @identity_get + Scenario Outline: Updare received for Identity "match" field + Given there are Identity records as follows: + | identityKey  | + | TIN_RECORD  | + | BRONZE_RECORD | + | GOLD_RECORD  | + Given request contains botKey with right access level + When an Identity search request by browserId for silver is received + Then return the requested Identity record(s) or an appropriate response + + @for_testing @acceptance @for_testing @identity @identity_get + Scenario Outline: Updare received for Identity "match" field + Given there are Identity records as follows: + | identityKey  | + | TIN_RECORD  | + | BRONZE_RECORD | + | GOLD_RECORD  | + Given request contains botKey with right access level + When an Identity search request by p + pid for gold is received + Then return the requested Identity record(s) or an appropriate response + + @for_testing @acceptance @for_testing @identity @identity_get + Scenario Outline: Updare received for Identity "match" field + Given there are Identity records as follows: + | identityKey  | + | TIN_RECORD  | + | BRONZE_RECORD | + | GOLD_RECORD  | + Given request contains botKey with right access level + When an Identity search request by foreignId for undefined is received + Then return the requested Identity record(s) or an appropriate response + + @for_testing @acceptance @for_testing @identity @identity_get + Scenario Outline: Updare received for Identity "match" field + Given there are Identity records as follows: + | identityKey  | + | TIN_RECORD  | + | BRONZE_RECORD | + | GOLD_RECORD  | + Given request contains botKey with right access level + When an Identity search request by phone for undefined is received + Then return the requested Identity record(s) or an appropriate response + +Failures: + +1) Background: + Step: Given there are Identity records as follows: - features/identity/get_identity.feature:15 + Message: + Multiple step definitions match: + /^there are Identity records as follows:$/ - features/dialog/step_definition.js:25 + /^there are Identity records as follows:$/ - features/event/step_definition.js:24 + /^there are Identity records as follows:$/ - features/identity/step_definition.js:23 + +2) Background: + Step: Given there are Identity records as follows: - features/identity/get_identity.feature:15 + Message: + Multiple step definitions match: + /^there are Identity records as follows:$/ - features/dialog/step_definition.js:25 + /^there are Identity records as follows:$/ - features/event/step_definition.js:24 + /^there are Identity records as follows:$/ - features/identity/step_definition.js:23 + +3) Background: + Step: Given there are Identity records as follows: - features/identity/get_identity.feature:15 + Message: + Multiple step definitions match: + /^there are Identity records as follows:$/ - features/dialog/step_definition.js:25 + /^there are Identity records as follows:$/ - features/event/step_definition.js:24 + /^there are Identity records as follows:$/ - features/identity/step_definition.js:23 + +4) Background: + Step: Given there are Identity records as follows: - features/identity/get_identity.feature:15 + Message: + Multiple step definitions match: + /^there are Identity records as follows:$/ - features/dialog/step_definition.js:25 + /^there are Identity records as follows:$/ - features/event/step_definition.js:24 + /^there are Identity records as follows:$/ - features/identity/step_definition.js:23 + +5) Background: + Step: Given there are Identity records as follows: - features/identity/get_identity.feature:15 + Message: + Multiple step definitions match: + /^there are Identity records as follows:$/ - features/dialog/step_definition.js:25 + /^there are Identity records as follows:$/ - features/event/step_definition.js:24 + /^there are Identity records as follows:$/ - features/identity/step_definition.js:23 + +6) Background: + Step: Given there are Identity records as follows: - features/identity/get_identity.feature:15 + Message: + Multiple step definitions match: + /^there are Identity records as follows:$/ - features/dialog/step_definition.js:25 + /^there are Identity records as follows:$/ - features/event/step_definition.js:24 + /^there are Identity records as follows:$/ - features/identity/step_definition.js:23 + +Warnings: + +1) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:29 + Step: Given request contains botKey with right access level - features/identity/get_identity.feature:23 + Message: + Undefined. Implement with the following snippet: + + this.Given(/^request contains botKey with right access level$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +2) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:29 + Step: When an Identity search request by tinId for tin is received - features/identity/get_identity.feature:24 + Message: + Undefined. Implement with the following snippet: + + this.When(/^an Identity search request by (.*) for (.*) is received$/, function (matchField, medal, callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +3) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:29 + Step: Then return the requested Identity record(s) or an appropriate response - features/identity/get_identity.feature:25 + Message: + Undefined. Implement with the following snippet: + + this.Then(/^return the requested Identity record\(s\) or an appropriate response$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +4) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:30 + Step: Given request contains botKey with right access level - features/identity/get_identity.feature:23 + Message: + Undefined. Implement with the following snippet: + + this.Given(/^request contains botKey with right access level$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +5) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:30 + Step: When an Identity search request by email for bronze is received - features/identity/get_identity.feature:24 + Message: + Undefined. Implement with the following snippet: + + this.When(/^an Identity search request by (.*) for (.*) is received$/, function (matchField, medal, callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +6) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:30 + Step: Then return the requested Identity record(s) or an appropriate response - features/identity/get_identity.feature:25 + Message: + Undefined. Implement with the following snippet: + + this.Then(/^return the requested Identity record\(s\) or an appropriate response$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +7) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:31 + Step: Given request contains botKey with right access level - features/identity/get_identity.feature:23 + Message: + Undefined. Implement with the following snippet: + + this.Given(/^request contains botKey with right access level$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +8) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:31 + Step: When an Identity search request by browserId for silver is received - features/identity/get_identity.feature:24 + Message: + Undefined. Implement with the following snippet: + + this.When(/^an Identity search request by (.*) for (.*) is received$/, function (matchField, medal, callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +9) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:31 + Step: Then return the requested Identity record(s) or an appropriate response - features/identity/get_identity.feature:25 + Message: + Undefined. Implement with the following snippet: + + this.Then(/^return the requested Identity record\(s\) or an appropriate response$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + +10) Scenario: Updare received for Identity "match" field - features/identity/get_identity.feature:32 + Step: Given request contains botKey with right access level - features/identity/get_identity.feature:23 + Message: + Undefined. Implement wi>> Exited with code: 1. +Warning: Task "exec:run_cucumber_tests" failed. Use --force to continue. + +Aborted due to warnings. diff --git a/features/identity/post_identity.feature b/features/identity/post_identity.feature index c2d7acd..6b2e8f7 100644 --- a/features/identity/post_identity.feature +++ b/features/identity/post_identity.feature @@ -12,7 +12,6 @@ Feature: upsert identity Rules: - ... -@for_testing Background: Given there are Identity records as follows: | identityKey | @@ -20,14 +19,13 @@ Background: | BRONZE_RECORD | | GOLD_RECORD | -@acceptance @for_testing +@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 - -@for_testing + Scenario Outline: Updare received for Identity "match" field When an Identity update is received with Then review medal match when upserting an Identity tin record diff --git a/features/identity/step_definition.js b/features/identity/step_definition.js index b220283..fc142ea 100644 --- a/features/identity/step_definition.js +++ b/features/identity/step_definition.js @@ -30,11 +30,32 @@ module.exports = function() { // then validate true to complete this step. }; + //TODO: is this just a global step? + this.Given(/^request contains botKey with right access level$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + this.When(/^an Identity update is received for a non\-matching field$/, function (callback) { // Write code here that turns the phrase above into concrete actions callback(null, 'pending'); }); + this.When(/^an Identity search request by (.*) for (.*) type is received$/, function (matchField, medal, callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + + this.When(/^an Identity update is received with (.*)$/, function (matchField, callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + + this.When(/^an aliased foreignId is received$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + this.Then(/^upsert an Identity tin record$/, function () { // Write code here that turns the phrase above into concrete actions }); @@ -48,11 +69,6 @@ module.exports = function() { callback(null, 'pending'); }); - this.When(/^an Identity update is received with (.*)$/, function (matchField, callback) { - // Write code here that turns the phrase above into concrete actions - callback(null, 'pending'); - }); - this.Then(/^review medal match when upserting an Identity tin record$/, function () { // Write code here that turns the phrase above into concrete actions }); @@ -61,4 +77,9 @@ module.exports = function() { // Write code here that turns the phrase above into concrete actions }); + this.Then(/^return the requested Identity record\(s\) or an appropriate response$/, function (callback) { + // Write code here that turns the phrase above into concrete actions + callback(null, 'pending'); + }); + };