Skip to content
Snippets Groups Projects
Commit 1be613eb authored by Shridhar Honmore's avatar Shridhar Honmore
Browse files

BDD review

parent 341f9d06
No related branches found
No related tags found
2 merge requests!8Develop,!4Proof Manager BDD
Feature: Send Out Of Band Presentation Request As a OCM Admin
I want to verify user credentials. I want to verify credentials without connection.
Scenario: Send Out Of Band Presentation Request Scenario: OCM admin verify credentials
Given I have passed all the required proof presentation details. Given PCM user should hold credentials in there wallet.
When I have passed all invalid proof presentation details. When OCM verifer orgnization sends a proof presentation request with following fields ( schemaId or credentialDefId, attributes ) to PCM user.
Then should return the presentation request required following attributes ( attributes, schemaId or credentialDefId ). And PCM user share the attributes from requested credentials to OCM verifer.
And OCM verifer verify the presentation acknowledgement.
Scenario: Send Out Of Band Presentation Request Then Presentation request should be in 'verified' state.
Given I have passed credential_def_id.
When I pass invalid credential_def_id. Scenario: OCM admin verify credentials
Then should return the 400 status code. Given PCM user should hold credentials in there wallet.
When OCM admin send a credential request to PCM user.
Scenario: Send Out Of Band Presentation Request And PCM user decline the credential request witch will requested from OCM admin.
Given I have passed attributes.
When I pass invalid attributes. Scenario: OCM admin verify credentials
Then should return the 400 status code. Given PCM user should hold credentials in there wallet.
When OCM admin have not passed all required parameters to proof request.
Scenario: Send Out Of Band Presentation Request Then should return the presentation request required following fields ( chemaId or credentialDefId, attributes ).
Given I have passed attributes and credential_def_id.
When I pass valid attributes.
And I pass valid credential_def_id. # Feature: Send Out Of Band Presentation Request
Then should return the 400 status code. # I want to verify user credentials.
Scenario: Send Out Of Band Presentation Request # Scenario: Send Out Of Band Presentation Request
Given I have passed attributes and credential_def_id. # Given I have passed all the required proof presentation details.
When I pass valid attributes. # When I have passed all invalid proof presentation details.
And I pass invalid credential_def_id. # Then should return the presentation request required following attributes ( attributes, schemaId or credentialDefId ).
Then should return the 400 status code.
# Scenario: Send Out Of Band Presentation Request
Scenario: Send Out Of Band Presentation Request0 # Given I have passed credential_def_id.
Given I have passed all the required proof presentation credential_def_id and attributes. # When I pass invalid credential_def_id.
When I have passed all valid proof presentation details i.e credential_def_id and attributes. # Then should return the 400 status code.
Then the proof presentation request sent to the holder with provided attributes.
And should return presentation id # Scenario: Send Out Of Band Presentation Request
And store presentation id, status, their_did into OCM database. # Given I have passed attributes.
And should return the valid status code 201. # When I pass invalid attributes.
# Then should return the 400 status code.
# Scenario: Send Out Of Band Presentation Request
# Given I have passed attributes and credential_def_id.
# When I pass valid attributes.
# And I pass valid credential_def_id.
# Then should return the 400 status code.
# Scenario: Send Out Of Band Presentation Request
# Given I have passed attributes and credential_def_id.
# When I pass valid attributes.
# And I pass invalid credential_def_id.
# Then should return the 400 status code.
# Scenario: Send Out Of Band Presentation Request0
# Given I have passed all the required proof presentation credential_def_id and attributes.
# When I have passed all valid proof presentation details i.e credential_def_id and attributes.
# Then the proof presentation request sent to the holder with provided attributes.
# And should return presentation id
# And store presentation id, status, their_did into OCM database.
# And should return the valid status code 201.
Feature: Send Presentation Request As a OCM Admin
I want to verify user credentials. I want to verify credentials.
Scenario: Send Presentation Request Scenario: OCM admin verify credentials
Given I have passed all the required proof presentation details. Given PCM user should hold credentials in there wallet.
When I have passed all invalid proof presentation details. And PCM user connection must be in trusted state with verifer.
Then should return the presentation request required following attributes ( connectionId, attributes, schemaId or credentialDefId ). When OCM verifer orgnization sends a proof presentation request with following fields ( connectionId, schemaId or credentialDefId, attributes ) to PCM user.
And PCM user share the attributes from requested credentials to OCM verifer.
Scenario: Send Presentation Request And OCM verifer verify the presentation acknowledgement.
Given I have passed credential_def_id. Then Presentation request should be in 'verified' state.
When I pass invalid credential_def_id.
Then should return the 400 status code. Scenario: OCM admin verify credentials
Given PCM user should hold credentials in there wallet.
Scenario: Send Presentation Request When OCM admin send a credential request to PCM user.
Given I have passed connectionId. And PCM user decline the credential request witch will requested from OCM admin.
When I pass invalid connectionId.
Then should return the 400 status code. Scenario: OCM admin verify credentials
Given PCM user should hold credentials in there wallet.
Scenario: Send Presentation Request When OCM admin have not passed all required parameters to proof request.
Given I have passed attributes. Then should return the presentation request required following fields ( connectionId, attributes, schemaId or credentialDefId ).
When I pass invalid attributes.
Then should return the 400 status code. # Scenario: Send Presentation Request
# Given I have passed credential_def_id.
Scenario: Send Presentation Request # When I pass invalid credential_def_id.
Given I have passed connectionId, attributes and credential_def_id. # Then should return the 400 status code.
When I pass valid attributes.
And I pass valid credential_def_id. # Scenario: Send Presentation Request
And I pass invalid connectionId. # Given I have passed connectionId.
Then should return the 400 status code. # When I pass invalid connectionId.
# Then should return the 400 status code.
Scenario: Send Presentation Request
Given I have passed connectionId, attributes and credential_def_id. # Scenario: Send Presentation Request
When I pass valid attributes. # Given I have passed attributes.
And I pass invalid credential_def_id. # When I pass invalid attributes.
And I pass valid connectionId. # Then should return the 400 status code.
Then should return the 400 status code.
# Scenario: Send Presentation Request
Scenario: Send Presentation Request # Given I have passed connectionId, attributes and credential_def_id.
Given I have passed all the required proof presentation credential_def_id, connectionId and attributes. # When I pass valid attributes.
When I have passed all valid proof presentation details i.e credential_def_id, connectionId and attributes. # And I pass valid credential_def_id.
Then the proof presentation request sent to the holder with provided attributes. # And I pass invalid connectionId.
And should return presentation id # Then should return the 400 status code.
And store presentation id, status, their_did into OCM database.
And should return the valid status code 201. # Scenario: Send Presentation Request
# Given I have passed connectionId, attributes and credential_def_id.
# When I pass valid attributes.
# And I pass invalid credential_def_id.
# And I pass valid connectionId.
# Then should return the 400 status code.
Feature: Send Principal Credential Presentation Request Feature: I am able to issue credential to the PCM user.
I want to change connection status in trusted state from active state. To make subscription service connection trusted of an organization.
So I am able to issue credential to the PCM user.
Scenario: Send principal credential presentation request
Given I pass valid connection id.
Then the proof presentation request is sent to the holder with provided attributes.
Scenario: Send principal credential presentation request Scenario: Send principal credential presentation request
Given invalid connection id is passed. Given PCM user should hold credentials in there wallet.
Then should return the 500 execption. And PCM user connection must be in complete state with verifer.
When OCM verifer orgnization sends a proof presentation request with following fields ( schemaId, attributes ) to PCM user.
And PCM user share the attributes from requested credentials to OCM verifer.
And OCM verifer verify the presentation acknowledgement.
Then Presentation request should be in 'trusted' state.
And PCM user get the principal credential.
Scenario: Send principal credential presentation request # Scenario: Send principal credential presentation request
Given I am not passing a connection id. # Given invalid connection id is passed.
Then should return the Required following attributes ( presentation_id ) with status code 400. # Then should return the 404 execption.
Scenario: Send principal credential presentation request # Scenario: Send principal credential presentation request
Given I have passed a connection id and credential type. # Given I am not passing a connection id.
When passed connection id is valid. # Then should return the Required following attributes ( presentation_id ) with status code 400.
And passed credential type is valid.
Then the get principal credentials details from the attestation service.
And the proof presentation request sent to the holder with provided attributes.
Scenario: Send principal credential presentation request # Scenario: Send principal credential presentation request
Given I have passed a connection id and credential type. # Given I have passed a connection id and credential type.
When passed connection id is valid. # When passed connection id is valid.
And passed credential type is invalid. # And passed credential type is valid.
Then should not received principal credentials details from the attestation service. # Then the get principal credentials details from the attestation service.
And should return the 500 execption. # And the proof presentation request sent to the holder with provided attributes.
# Scenario: Send principal credential presentation request
# Given I have passed a connection id and credential type.
# When passed connection id is valid.
# And passed credential type is invalid.
# Then should not received principal credentials details from the attestation service.
# And should return the 404 execption.
Scenario: Send principal credential presentation request
Given I have passed all the required proof presentation details.
When I passed valid proof presentation details.
Then the proof presentation request sent to the holder with provided attributes.
And should return presentation id
And store presentation id, status, their_did into OCM database.
And should return the valid status code 201.
Feature: Webhook call for update presentation status.
Scenario: Received validated DTO from NATS call.
Given Webhook valid object .
When passed presentation status as presentation received.
And passed valid proof request id.
Then should update presentation proof status in DB.
Scenario: Received validated DTO from NATS call .
Given Webhook valid object .
When passed presentation status as Done.
And passed valid proof request id.
Then should update presentation proof status in DB.
And make connection status to trusted.
Scenario: Received validated DTO from NATS call And Auto accept request is true.
Given Webhook valid object .
When passed presentation status as presentation received.
And passed valid proof request id.
Then should update presentation proof status in DB.
And accept presentation proof request.
And return valis message "Presentation received request accepted successfully".
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment