diff --git a/features/attestation-manager/credentialDef/createCredentialDef.feature b/features/attestation-manager/credentialDef/createCredentialDef.feature new file mode 100644 index 0000000000000000000000000000000000000000..9f8a9c08cf9d2a33bb46bf5de1a2801899ff32bc --- /dev/null +++ b/features/attestation-manager/credentialDef/createCredentialDef.feature @@ -0,0 +1,26 @@ +As an OCM user + I want to create a new Credential Definition + +Feature: Create a new Credential Definition + Create a new Credential Definition on Ledger and save details in DB + + Scenario: Provide valid and required Credential Definition Details + Given I have passed all required credential definition details. + # src\credentialDef\controller\controller.ts -> REST API with POST method -> credentialDef/ + When passed all valid credential definition details. + Then credential definition should be created on the Ledger with the given details. + And should return the newly created credential definition id. + And store the details in DB. + And I should get the HTTP status code 201 Created and the created Credential Definition Details. + + Scenario: Provide invalid schemaID, name, created_by, is_revokable or is_auto_issue + Given I have passed schemaID, name, created_by, is_revokable and is_auto_issue. + # src\credentialDef\controller\controller.ts -> REST API with POST method -> credentialDef/ + When passed invalid schemaID, name, created_by, is_revokable or is_auto_issue. + Then I should get HTTP status code 400 Bad Request. + + Scenario: Provide name and schemaID of the existing Credential Definition. + Given I have passed all required credential definition details. + # src\credentialDef\controller\controller.ts -> REST API with POST method -> credentialDef/ + When passed name and schemaID of the existing Credential Definition. + Then I should get HTTP status code 409 Conflict. \ No newline at end of file diff --git a/features/attestation-manager/credentialDef/findCredentialDef.feature b/features/attestation-manager/credentialDef/findCredentialDef.feature new file mode 100644 index 0000000000000000000000000000000000000000..5dac4c177e44347ff737f88bc84546f12c837f34 --- /dev/null +++ b/features/attestation-manager/credentialDef/findCredentialDef.feature @@ -0,0 +1,17 @@ +As an OCM user + I want to get all Credential Definitions by schema id + +Feature: Get All Credential Definitions by schema id + Get All Credential Definitions from the DB by given schema id + + Scenario: Provide valid schema id, page and page size. + Given I have passed the required schema id, page and page size. + # src\credentialDef\controller\controller.ts -> REST API with GET method -> credentialDef/ + When passed details are valid. + Then I should get the HTTP status code 200 Ok and list of Credential Definitions from the DB. + + Scenario: Provide invalid schema id. + Given I have passed the required schema id. + # src\credentialDef\controller\controller.ts -> REST API with GET method -> credentialDef/ + When passed schema id is invalid. + Then I should get the HTTP status code 404 NOT Found. \ No newline at end of file diff --git a/features/attestation-manager/credentialDef/findCredentialDefById.feature b/features/attestation-manager/credentialDef/findCredentialDefById.feature new file mode 100644 index 0000000000000000000000000000000000000000..270c148c1d1688976d0ddc708047e6f55f38a6d7 --- /dev/null +++ b/features/attestation-manager/credentialDef/findCredentialDefById.feature @@ -0,0 +1,17 @@ +As an OCM user + I want to find Credential Definition by id + +Feature: Get Credential Definition by Id + Get Credential Definition by the given cred_def_id + + Scenario: Provide valid cred_def_id. + Given I have passed the required cred_def_id. + # src\credentialDef\controller\controller.ts -> REST API with GET method -> credentialDef/:id + When passed cred_def_id is valid. + Then I should get the HTTP status code 200 Ok and Credential Definition from the DB. + + Scenario: Provide invalid cred_def_id. + Given I have passed the required cred_def_id. + # src\credentialDef\controller\controller.ts -> REST API with GET method -> credentialDef/:id + When passed cred_def_id is invalid. + Then I should get the HTTP status code 404 Not Found. diff --git a/features/attestation-manager/issue-credential/acceptOfferCredential.feature b/features/attestation-manager/issue-credential/acceptOfferCredential.feature new file mode 100644 index 0000000000000000000000000000000000000000..a30ce0d1b25e05da415e5b674c4a0da8832dab3a --- /dev/null +++ b/features/attestation-manager/issue-credential/acceptOfferCredential.feature @@ -0,0 +1,12 @@ +As an OCM user + I want to accept a credential offer + +Feature: Accept offer credential + Accept a credential offer + + Scenario: Provide valid and required credentialId + Given I have passed all required details. + # src\issue-credential\controller\controller.ts -> REST API with POST method -> accept-request/ + When passed all valid accept offer credential details. + Then credential offer should get accepted. + And I should get the HTTP status code 202 Accepted and the updated credential offer Details. \ No newline at end of file diff --git a/features/attestation-manager/issue-credential/createCredentialType.feature b/features/attestation-manager/issue-credential/createCredentialType.feature new file mode 100644 index 0000000000000000000000000000000000000000..2231f0a61297d3e62cb236295f2a823f90b72939 --- /dev/null +++ b/features/attestation-manager/issue-credential/createCredentialType.feature @@ -0,0 +1,18 @@ +As an OCM user + I want to create a new CredentialType + +Feature: Create a new CredentialType + Create a new CredentialType + + Scenario: Provide valid and required CredentialType Details + Given I have passed all required credentialType details. + # src\issue-credential\controller\controller.ts -> REST API with POST method -> credentialType/ + When passed all valid credentialType details. + Then credentialType should be created in DB. + And I should get the HTTP status code 201 Created and the created CredentialType Details. + + Scenario: Provide invalid schema_id or type + Given I have passed schema_id and type. + # src\issue-credential\controller\controller.ts -> REST API with POST method -> credentialType/ + When passed invalid schema_id or type. + Then I should get HTTP status code 400 Bad Request. \ No newline at end of file diff --git a/features/attestation-manager/issue-credential/createOfferCredential.feature b/features/attestation-manager/issue-credential/createOfferCredential.feature new file mode 100644 index 0000000000000000000000000000000000000000..4354f25da078637d7a71dc7a7900c0453066721c --- /dev/null +++ b/features/attestation-manager/issue-credential/createOfferCredential.feature @@ -0,0 +1,12 @@ +As an OCM user + I want to create credential offer + +Feature: Create offer credential + Create a credential offer + + Scenario: Provide valid and required connectionId, credentialDefinitionId, comment, preview and autoAcceptCredential + Given I have passed all required offer credential details. + # src\issue-credential\controller\controller.ts -> REST API with POST method -> create-offer-credential/ + When passed all valid offer credential details. + Then credential offer should be sent to the given connection. + And I should get the HTTP status code 201 Created and the created credential offer Details. \ No newline at end of file diff --git a/features/attestation-manager/issue-credential/getCredential.feature b/features/attestation-manager/issue-credential/getCredential.feature new file mode 100644 index 0000000000000000000000000000000000000000..9f503d9d267c96783a0a3ec374b1c84de39e1688 --- /dev/null +++ b/features/attestation-manager/issue-credential/getCredential.feature @@ -0,0 +1,16 @@ +As an OCM user + I want to get credentials + +Feature: Get credential + + Scenario: Provide valid credential_id + Given I have passed all required details. + # src\issue-credential\controller\controller.ts -> REST API with POST method -> credential/:id + When passed valid credential_id. + Then I should get the HTTP status code 200 Ok and the credential Details. + + Scenario: Provide invalid credential_id + Given I have passed all required details. + # src\issue-credential\controller\controller.ts -> REST API with POST method -> credential/:id + When passed invalid credential_id. + Then I should get the HTTP status code 404 Not Found. \ No newline at end of file diff --git a/features/attestation-manager/issue-credential/getCredentialsTypeDetails.feature b/features/attestation-manager/issue-credential/getCredentialsTypeDetails.feature new file mode 100644 index 0000000000000000000000000000000000000000..5c832c424e128b472331ab31e001f6acb4647efd --- /dev/null +++ b/features/attestation-manager/issue-credential/getCredentialsTypeDetails.feature @@ -0,0 +1,11 @@ +As an OCM user + I want to get the credentialType details of a given type + +Feature: Get CredentialType details + Get the details of credentialType of given type + + Scenario: Provide valid and required type + Given I have passed type. + # src\issue-credential\controller\controller.ts -> NATS call for topic 'ATTESTATION_MANAGER_SERVICE/getCredentialsTypeDetails' + When passed valid type. + Then I should get the details of the CredentialType. \ No newline at end of file diff --git a/features/attestation-manager/issue-credential/getIssuedCredentials.feature b/features/attestation-manager/issue-credential/getIssuedCredentials.feature new file mode 100644 index 0000000000000000000000000000000000000000..18e42601ef308ee5e21282f8521a69a746cd435f --- /dev/null +++ b/features/attestation-manager/issue-credential/getIssuedCredentials.feature @@ -0,0 +1,10 @@ +As an OCM user + I want to get the credentials issued to a given connection + +Feature: Get issued credentials of a given connection + + Scenario: Provide valid and required connection_id + Given I have passed connection_id. + # src\issue-credential\controller\controller.ts -> NATS call for topic 'ATTESTATION_MANAGER_SERVICE/getIssueCredentials' + When passed valid connection_id. + Then I should get the list of Credentials Issued. \ No newline at end of file diff --git a/features/attestation-manager/issue-credential/offerMemberShipCredentials.feature b/features/attestation-manager/issue-credential/offerMemberShipCredentials.feature new file mode 100644 index 0000000000000000000000000000000000000000..96a06ff401e9c10696f04eda14d8bf6d1a62f5dc --- /dev/null +++ b/features/attestation-manager/issue-credential/offerMemberShipCredentials.feature @@ -0,0 +1,12 @@ +As an OCM user + I want to offer MemberShip Credentials + +Feature: Offer Membership Credential + Offer a membership credential to User + + Scenario: Provide valid and required status, connectionId, theirLabel and participantDid + Given AFJ Agent NATS Publisher have passed all required offer membership credential details. + # src\issue-credential\controller\controller.ts -> NATS call for topic 'ATTESTATION_MANAGER_SERVICE/offerMemberShipCredentials' + When passed all valid offer membership credential details. + Then credential offer should be sent to the given connection. + And I should get the HTTP status code 201 Created and the created membership credential offer Details. \ No newline at end of file diff --git a/features/attestation-manager/issue-credential/updateSchemaIdByType.feature b/features/attestation-manager/issue-credential/updateSchemaIdByType.feature new file mode 100644 index 0000000000000000000000000000000000000000..8a5fa42e0a2c5a8c1f99812bfe8d522ffaa84a20 --- /dev/null +++ b/features/attestation-manager/issue-credential/updateSchemaIdByType.feature @@ -0,0 +1,12 @@ +As an OCM user + I want to update schema_id in credentialType of given type + +Feature: Update schema_id by type + update schema_id in credentialType for given type + + Scenario: Provide valid and required schema_id and type + Given I have passed all required details. + # src\issue-credential\controller\controller.ts -> REST API with POST method -> updateSchemaIdByType/ + When passed valid schema_id and type. + Then credentialType should be updated. + And I should get the HTTP status code 200 Ok and the updated credentialType Details. \ No newline at end of file diff --git a/features/attestation-manager/issue-credential/webHookCredentials.feature b/features/attestation-manager/issue-credential/webHookCredentials.feature new file mode 100644 index 0000000000000000000000000000000000000000..97102b2c6a639d1bd5ef73dcdae53f92071bb102 --- /dev/null +++ b/features/attestation-manager/issue-credential/webHookCredentials.feature @@ -0,0 +1,19 @@ +As an OCM user + I want to save the credential details from Webhook emitted by AFJ Agent + +Feature: Credentials Webhook + Credential Webhook Emitted by AFJ + + Scenario: A new Credential is offered + Given AFJ Agent have passed created credential details. + # src\issue-credential\controller\controller.ts -> NATS call for topic 'ATTESTATION_MANAGER_SERVICE/CredentialStateChanged' + When passed credential state is OFFER_SENT. + Then credential should be created in DB. + And I should get the HTTP status code 201 Created and the created credential Details. + + Scenario: A Credential's state is changed + Given AFJ have passed the updated credential details. + # src\issue-credential\controller\controller.ts -> NATS call for topic 'ATTESTATION_MANAGER_SERVICE/CredentialStateChanged' + When passed credential state is not OFFER_SENT. + Then credential state should be updated in DB. + And I should get the HTTP status code 202 Accepted and the updated credential Details. diff --git a/features/attestation-manager/schemas/createSchema.feature b/features/attestation-manager/schemas/createSchema.feature new file mode 100644 index 0000000000000000000000000000000000000000..c847dc7f26d3e91c135db8defd55016a738658a7 --- /dev/null +++ b/features/attestation-manager/schemas/createSchema.feature @@ -0,0 +1,26 @@ +As an OCM user + I want to create a new Schema + +Feature: Create a new Schema + Create a new Schema on Ledger and save details in DB + + Scenario: Provide valid and required Schema Details + Given I have passed all required schema details. + # src\schemas\controller\controller.ts -> REST API with POST method -> schemas/ + When passed all valid schema details. + Then schema should be created on the Ledger with the given details. + And should return the newly created Schema_ID. + And store the details in DB. + And I should get the HTTP status code 201 Created and the created Schema Details. + + Scenario: Provide invalid name, created_by, version or attributes + Given I have passed name, created_by, version and attributes. + # src\schemas\controller\controller.ts -> REST API with POST method -> schemas/ + When passed invalid name, created_by, version or attributes. + Then I should get the HTTP status code 400 Bad Request. + + Scenario: Provide name and version of the existing Schema. + Given I have passed all required schema details. + # src\schemas\controller\controller.ts -> REST API with POST method -> schemas/ + When passed name and version of the existing Schema. + Then I should get the HTTP status code 409 Conflict. \ No newline at end of file diff --git a/features/attestation-manager/schemas/findSchemaById.feature b/features/attestation-manager/schemas/findSchemaById.feature new file mode 100644 index 0000000000000000000000000000000000000000..51cdb9bfb072130eab6506d0baba2bb020945164 --- /dev/null +++ b/features/attestation-manager/schemas/findSchemaById.feature @@ -0,0 +1,17 @@ +As an OCM user + I want to get the Schema by id + +Feature: Get Schema by Id + Get Schema by the given schema id + + Scenario: Provide valid schema id. + Given I have passed the required schema id. + # src\schemas\controller\controller.ts -> REST API with GET method -> schemas/:id + When passed schema id is valid. + Then I should get the HTTP status code 200 Ok and Schema from the DB. + + Scenario: Provide invalid schema id. + Given I have passed the required schema id. + # src\schemas\controller\controller.ts -> REST API with GET method -> schemas/:id + When passed schema id is invalid. + Then I should get the HTTP status code 404 Not Found. diff --git a/features/attestation-manager/schemas/findSchemas.feature b/features/attestation-manager/schemas/findSchemas.feature new file mode 100644 index 0000000000000000000000000000000000000000..384c8c8eb6849bc37694162f8ac66f42bbe2d966 --- /dev/null +++ b/features/attestation-manager/schemas/findSchemas.feature @@ -0,0 +1,11 @@ +As an OCM user + I want to get list of all the Schemas + +Feature: Get All Schemas + Get All Schemas from the DB + + Scenario: Provide valid page and page size. + Given I have passed the required page and page size. + # src\schemas\controller\controller.ts -> REST API with GET method -> schemas/ + When passed details are valid. + Then I should get the HTTP status code 200 Ok and list of Schemas from the DB. \ No newline at end of file diff --git a/features/attestation-manager/schemas/getDidsForSchema.feature b/features/attestation-manager/schemas/getDidsForSchema.feature new file mode 100644 index 0000000000000000000000000000000000000000..55aebf611b763e2e1edc92fa298b625d270ac0de --- /dev/null +++ b/features/attestation-manager/schemas/getDidsForSchema.feature @@ -0,0 +1,17 @@ +As an OCM user + I want to get all principal DIDs for a given schema id + +Feature: Get all DIDs for Schema + Get all principal DIDs for a given schema id + + Scenario: Provide valid schema id. + Given I have passed the required schema id. + # src\schemas\controller\controller.ts -> REST API with GET method -> get-dids-for-schema/:id + When passed schema id is valid. + Then I should get the HTTP status code 200 Ok and Schema DIDs from the DB. + + Scenario: Provide invalid schema id. + Given I have passed the required schema id. + # src\schemas\controller\controller.ts -> REST API with GET method -> get-dids-for-schema/:id + When passed schema id is invalid. + Then I should get the HTTP status code 404 Not Found. \ No newline at end of file