diff --git a/gherkin/features/issue_612/issue_610.feature b/gherkin/features/issue_612/issue_610.feature deleted file mode 100644 index 5f40ed4..0000000 --- a/gherkin/features/issue_612/issue_610.feature +++ /dev/null @@ -1,216 +0,0 @@ -@govstack -@critical -@allure.issue:https://github.com/decentralised-dataexchange/bb-consent-api/issues/612 -@allure.label.author:George -@allure.label.as_id:612 -Feature: Revisions - - @positive @get_data_agreement - Scenario Outline: CONFIG - LIST - List data agreement revisions - Given a data agreement ID "" - When I make a GET request to /config/data-agreement/"" - Then The response should have a status code of 200 - And The response should contain the data agreement details for "" - - Examples: Valid data - | dataAgreementId | - | 1 | - | 659c12ea3140212807b80000 | - - @positive @list_data_agreements - Scenario Outline: CONFIG - LIST - List all data agreements - Given a data agreement ID "" - When I make a GET request to /config/data-agreements - Then The response should have a status code of 200 - And The response should contain the data agreements and data agreement details for "" - - Examples: Valid data - | dataAgreementId | - | 1 | - | 659c12ea3140212807b80000 | - - @positive @delete_data_agreement - Scenario Outline: CONFIG - DELETE - Delete data agreement - Given a data agreement ID "" - When I make a DELETE request to /config/data-agreement/"" - Then The response should have a status code of 200 - And The response should only contain the data agreement revision details for "" - - Examples: Valid data - | dataAgreementId | - | 659e5aafa35cad660a9021f5 | - - @positive @list_data_agreement_revisions - Scenario Outline: CONFIG - LIST - List data agreement revisions - Given a data agreement ID "" - When I make a GET request to get data agreement revisions for data agreement "" - Then The response should have a status code of 200 - And The response should contain the data agreement revision details for "" - - Examples: Valid data - | dataAgreementId | - | 1 | - | 659c12ea3140212807b80000 | - - @positive @get_policy - Scenario Outline: CONFIG - READ - Read data policy - Given a policy ID "" - When I make a GET request to /config/policy/"" - Then The response should have a status code of 200 - And The response should contain the policy details for "" - - Examples: Valid data - | policyId | - | 1 | - | 2 | - - @positive @list_policies - Scenario Outline: CONFIG - LIST - List all data policies - Given a policy ID "" - When I make a GET request to /config/policies - Then The response should have a status code of 200 - And The response should contain policies and policy details for "" - - Examples: Valid data - | policyId | - | 1 | - | 2 | - - @positive @list_policy_revisions - Scenario Outline: CONFIG - LIST - List data policy revisions - Given a policy ID "" - When I make a GET request to get policy revisions for policy "" - Then The response should have a status code of 200 - And The response should contain the policy revision details for "" - - Examples: Valid data - | policyId | - | 1 | - | 2 | - - @positive @delete_policy - Scenario Outline: CONFIG - DELETE - Delete data policy - Given a policy ID "" - When I make a DELETE request to /config/policy/"" - Then The response should have a status code of 200 - And The response should only contain the policy revison details for "" - - Examples: Valid data - | policyId | - | 2 | - - @positive @service_get_data_agreement - Scenario Outline: SERVICE - READ - Read data agreement - Given a data agreement ID "" - And an individual ID "" - When I make a GET request to /service/data-agreement/"" - Then The response should have a status code of 200 - And The response should contain the data agreement details for "" - - Examples: Valid data - | dataAgreementId | individualId | - | 1 | 1 | - - @positive @service_read_policy - Scenario Outline: SERVICE - READ - Read data policy - Given an individual ID "" - And a policy ID "" - When I make a GET request to /service/policy/"" - Then The response should have a status code of 200 - And The response should contain the policy details for "" - - Examples: Valid data - | policyId | individualId | - | 1 | 1 | - - @positive @service_create_draft_consent_record - Scenario Outline: SERVICE - CREATE - Create draft consent record - Given an individual ID "" - And a data agreement ID "" - When I make a POST request to /service/individual/record/consent-record/draft - Then The response should have a status code of 200 - And The response should contain the draft consent record details - - Examples: Valid data - | dataAgreementId | individualId | - | 1 | 1 | - - @positive @service_create_consent_record - Scenario Outline: SERVICE - CREATE - Create consent record - Given an individual ID "" - And a data agreement ID "" - When I make a POST request to /service/individual/record/data-agreement/"" - Then The response should have a status code of 200 - And The response should contain the consent record details - - Examples: Valid data - | dataAgreementId | individualId | - | 659c12ea3140212807b80000 | 1 | - - @positive @service_get_consent_record - Scenario Outline: SERVICE - READ - Read consent record - Given an individual ID "" - And a data agreement ID "" - And a consent record ID "" - When I make a GET request to /service/individual/record/data-agreement/"" - Then The response should have a status code of 200 - And The response should only contain the consent record details for "" - - Examples: Valid data - | dataAgreementId | consentRecordId | individualId | - | 1 | 1 | 1 | - - - @positive @service_verification_fetch_consent_record - Scenario Outline: SERVICE - READ - Read latest consent record - Given an individual ID "" - And a data agreement ID "" - And a consent record ID "" - When I make a GET request to /service/verification/consent-record/"" - Then The response should have a status code of 200 - And The response should contain the consent record details for "" - - Examples: Valid data - | dataAgreementId | consentRecordId | individualId | - | 1 | 1 | 1 | - - @positive @service_update_consent_record - Scenario Outline: SERVICE - UPDATE - Update consent record - Given an individual ID "" - And a consent record ID "" - And a data agreement ID "" - When I make a PUT request to /service/individual/record/consent-record/"" - Then The response should have a status code of 200 - And The response should contain the consent record details for "" - - Examples: Valid data - | dataAgreementId | consentRecordId | individualId | - | 1 | 1 | 1 | - - @positive @service_verification_list_consent_records - Scenario Outline: SERVICE - LIST - List all consent records - Given an individual ID "" - And a data agreement ID "" - And a consent record ID "" - When I make a GET request to /service/verification/consent-records - Then The response should have a status code of 200 - And The response should contain the consent records and consent record details for "" - - Examples: Valid data - | dataAgreementId | consentRecordId | individualId | - | 1 | 1 | 1 | - - @positive @service_list_consent_records - Scenario Outline: SERVICE - LIST - List all consent records for individual - Given an individual ID "" - And a data agreement ID "" - And a consent record ID "" - When I make a GET request to /service/individual/record/consent-record - Then The response should have a status code of 200 - And The response should contain the consent records and consent record details for "" - - Examples: Valid data - | dataAgreementId | consentRecordId | individualId | - | 1 | 1 | 1 | - - diff --git a/gherkin/features/issue_612/issue_612.feature b/gherkin/features/issue_612/issue_612.feature new file mode 100644 index 0000000..51df4f5 --- /dev/null +++ b/gherkin/features/issue_612/issue_612.feature @@ -0,0 +1,53 @@ +@govstack +@critical +@allure.issue:https://github.com/decentralised-dataexchange/bb-consent-api/issues/612 +@allure.label.author:George +@allure.label.as_id:612 +Feature: Revisions + Changes to align with GovStack specifications. + Following conditions should be satisfied in the revision + - Contain `authorizedByOther` field + - Value of `schemaName` field should be the following: DataAgreement, Policy, ConsentRecord + - Remove the following fields from `serializedSnapshot` - `id`, `predecessorHash` and `predecessorSignature` + + @positive + Scenario: Data agreement revision + When I list all revisions for a data agreement with id "" + Then It returns a list of revisions. Returned revision contains `authorizedByOther` field + And Value of `schemaName` field is DataAgreement + And `serializedSnapshot` doesn't contain `id`, `predecessorHash` and `predecessorSignature` + + Examples: + | dataAgreementId | + | 1 | + + @positive + Scenario: Policy revision + When I list all revisions for a policy with id "" + Then It returns a list of revisions. Returned revision contains `authorizedByOther` field + And Value of `schemaName` field is Policy + And `serializedSnapshot` doesn't contain `id`, `predecessorHash` and `predecessorSignature` + + Examples: + | policyId | + | 1 | + + @positive + Scenario: Consent record revision + When I read latest consent record with id "" for verification + Then It returns a consent record and a revision. Returned revision contains `authorizedByOther` field + And Value of `schemaName` field is ConsentRecord + And `serializedSnapshot` doesn't contain `id`, `predecessorHash` and `predecessorSignature` + + Examples: + | consentRecordId | + | 1 | + + @positive + Scenario: Auto-generated revision during create data agreement + When I create a data agreement + Then It returns the created data agreement and a revision. Returned revision contains `authorizedByOther` field + And Value of `schemaName` field is DataAgreement + And `serializedSnapshot` doesn't contain `id`, `predecessorHash` and `predecessorSignature` + +