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

Commit

Permalink
identity alias and get
Browse files Browse the repository at this point in the history
  • Loading branch information
tewksbum committed Aug 1, 2017
1 parent 3be81a8 commit 9b87618
Show file tree
Hide file tree
Showing 7 changed files with 346 additions and 44 deletions.
5 changes: 1 addition & 4 deletions features/dialog/step_definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ var restFactory = require("../../rest_factory");
// {"term1": "term1", "prob": ".55"},
// {"term2": "term2", "prob": ".45"},
// ],
// "rawMessage": {
// "body": "stufff...",
// "text": "stufff...",
// },
// "rawMessage": "<html>green eggs and ham</html>",
// "message": "green eggs and ham"
// }

Expand Down
3 changes: 2 additions & 1 deletion features/identity/alias_identity.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ Feature: alias identity
Rules:
- ...

@for_testing
Background:
Given there are Identity records as follows:
| identityKey |
| TIN_RECORD |
| 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
Expand Down
56 changes: 26 additions & 30 deletions features/identity/get_identity.feature
Original file line number Diff line number Diff line change
@@ -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 <matchField> for <medal> 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

Examples:
| matchField | medal |
| tinId | tin |
| email | bronze |
| browserId | silver |
| p + pid | gold |
| foreignId |
| phone |

57 changes: 57 additions & 0 deletions features/identity/identalias.log
Original file line number Diff line number Diff line change
@@ -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.
232 changes: 232 additions & 0 deletions features/identity/identget.log
Original file line number Diff line number Diff line change
@@ -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.
Loading

0 comments on commit 9b87618

Please sign in to comment.