From af7fa7f979917b1d8974d3fb4d969a04833431dd Mon Sep 17 00:00:00 2001 From: Shridhar Honmore <shridhar.honmore@ayanworks.com> Date: Thu, 26 May 2022 18:00:33 +0530 Subject: [PATCH] BDD review --- features/proof/acceptPresentation.feature | 16 ------- .../proof/findProofByPresentationId.feature | 12 +++++ features/proof/findProofPresentation.feature | 20 --------- .../sendOutOfBandPresentationRequest.feature | 45 ------------------- .../proof/sendPresentationRequest.feature | 44 +++--------------- ...cipalCredentialPresentationRequest.feature | 33 ++------------ 6 files changed, 21 insertions(+), 149 deletions(-) delete mode 100644 features/proof/acceptPresentation.feature delete mode 100644 features/proof/findProofPresentation.feature diff --git a/features/proof/acceptPresentation.feature b/features/proof/acceptPresentation.feature deleted file mode 100644 index 49dc8bd..0000000 --- a/features/proof/acceptPresentation.feature +++ /dev/null @@ -1,16 +0,0 @@ -Feature: Accept Presentation Request - I will recive the presentation request from PCM user. - -Scenario: Accept Presentation Request - Given I have passed presentation id. - When I pass valid presentation id. - Then should accept the presentation request with status code 200. - -Scenario: Accept Presentation Request - Given I have passed presentation id. - When I pass invalid presentation id. - Then should return the status code 400. - -Scenario: Accept Presentation Request - Given I have not passed presentation id. - Then should return Accept presentation request required following attributes ( presentation_id ). \ No newline at end of file diff --git a/features/proof/findProofByPresentationId.feature b/features/proof/findProofByPresentationId.feature index 587e84f..3f79e64 100644 --- a/features/proof/findProofByPresentationId.feature +++ b/features/proof/findProofByPresentationId.feature @@ -11,6 +11,18 @@ Scenario: Provide invalid presentation id When provide invalid presentation id. Then should return no data found with status code 404. +Scenario: Provide validated page and pageSize + Given proof presentation data available on OCM database. + When passed valid page. + And passed valid pageSize. + Then should get proof presentation list. + +Scenario: Provide validated page and pageSize + Given proof presentation data is not available on OCM database. + When passed valid page. + And passed valid pageSize. + Then should get http status 404. + Scenario: Not provide a presentation id Given The presentation id available. When not provide presentation id. diff --git a/features/proof/findProofPresentation.feature b/features/proof/findProofPresentation.feature deleted file mode 100644 index 8eff447..0000000 --- a/features/proof/findProofPresentation.feature +++ /dev/null @@ -1,20 +0,0 @@ -Feature: Get Proof Presentation - Return the list of proof presentation created on OCM environment - -Scenario: Provide validated page and pageSize - Given proof presentation data available on OCM database. - When passed valid page. - And passed valid pageSize. - Then should get proof presentation list. - -Scenario: Provide validated page and pageSize - Given proof presentation data is not available on OCM database. - When passed valid page. - And passed valid pageSize. - Then should get http status 404. - -Scenario: Provide invalid page and pageSize - Given proof presentation data available on OCM database. - When passed invalid page. - And passed invalid pageSize. - Then should return no data available with http status 404. \ No newline at end of file diff --git a/features/proof/sendOutOfBandPresentationRequest.feature b/features/proof/sendOutOfBandPresentationRequest.feature index 0eb05fd..b8c631c 100644 --- a/features/proof/sendOutOfBandPresentationRequest.feature +++ b/features/proof/sendOutOfBandPresentationRequest.feature @@ -12,48 +12,3 @@ Scenario: OCM admin verify credentials Given PCM user should hold credentials in there wallet. When OCM admin send a credential request to PCM user. And PCM user decline the credential request witch will requested from OCM admin. - -Scenario: OCM admin verify credentials - Given PCM user should hold credentials in there wallet. - When OCM admin have not passed all required parameters to proof request. - Then should return the presentation request required following fields ( chemaId or credentialDefId, attributes ). - - -# Feature: Send Out Of Band Presentation Request -# I want to verify user credentials. - -# Scenario: Send Out Of Band Presentation Request -# Given I have passed all the required proof presentation details. -# When I have passed all invalid proof presentation details. -# Then should return the presentation request required following attributes ( attributes, schemaId or credentialDefId ). - -# Scenario: Send Out Of Band Presentation Request -# Given I have passed credential_def_id. -# When I pass invalid credential_def_id. -# Then should return the 400 status code. - -# Scenario: Send Out Of Band Presentation Request -# Given I have passed attributes. -# 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. - diff --git a/features/proof/sendPresentationRequest.feature b/features/proof/sendPresentationRequest.feature index 0380d9c..ad11156 100644 --- a/features/proof/sendPresentationRequest.feature +++ b/features/proof/sendPresentationRequest.feature @@ -9,44 +9,10 @@ Scenario: OCM admin verify credentials And OCM verifer verify the presentation acknowledgement. Then Presentation request should be in 'verified' state. -Scenario: OCM admin verify credentials - Given PCM user should hold credentials in there wallet. - When OCM admin send a credential request to PCM user. - And PCM user decline the credential request witch will requested from OCM admin. - -Scenario: OCM admin verify credentials +Scenario: PCM user decline proof request Given PCM user should hold credentials in there wallet. - When OCM admin have not passed all required parameters to proof request. - Then should return the presentation request required following fields ( connectionId, attributes, schemaId or credentialDefId ). - -# Scenario: Send Presentation Request -# Given I have passed credential_def_id. -# When I pass invalid credential_def_id. -# Then should return the 400 status code. - -# Scenario: Send Presentation Request -# Given I have passed connectionId. -# When I pass invalid connectionId. -# Then should return the 400 status code. - -# Scenario: Send Presentation Request -# Given I have passed attributes. -# When I pass invalid attributes. -# Then should return the 400 status code. - -# Scenario: Send Presentation Request -# Given I have passed connectionId, attributes and credential_def_id. -# When I pass valid attributes. -# And I pass valid credential_def_id. -# And 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. -# When I pass valid attributes. -# And I pass invalid credential_def_id. -# And I pass valid connectionId. -# Then should return the 400 status code. - - + And PCM user connection must be in trusted state with verifer. + When OCM verifer orgnization sends a proof presentation request with following fields ( connectionId, schemaId or credentialDefId, attributes ) to PCM user. + And PCM user declines the presentation request. + Then Presentation request is not 'verified'. diff --git a/features/proof/sendPrincipalCredentialPresentationRequest.feature b/features/proof/sendPrincipalCredentialPresentationRequest.feature index 7c79dae..fd68ed1 100644 --- a/features/proof/sendPrincipalCredentialPresentationRequest.feature +++ b/features/proof/sendPrincipalCredentialPresentationRequest.feature @@ -1,35 +1,10 @@ -Feature: I am able to issue credential to the PCM user. - To make subscription service connection trusted of an organization. +Feature: I am able to prove as GAIA-X ecosystem member. + To make the existing connection trusted. -Scenario: Send principal credential presentation request - Given PCM user should hold credentials in there wallet. +Scenario: Make the existing connection trusted + Given PCM user should hold principal membership credentials in there wallet. 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 -# Given invalid connection id is passed. -# Then should return the 404 execption. - -# Scenario: Send principal credential presentation request -# Given I am not passing a connection id. -# Then should return the Required following attributes ( presentation_id ) with status code 400. - -# 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 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 -# 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. - - -- GitLab