diff --git a/src/main/java/api/test/rest/pojo/presentationRequest/Data.java b/src/main/java/api/test/rest/pojo/presentationRequest/Data.java index 1615a0dae72da793141cce79c35ae0de94403bb5..e3d1ba2c53d1949f34d6c9bbc609e051e71d007c 100644 --- a/src/main/java/api/test/rest/pojo/presentationRequest/Data.java +++ b/src/main/java/api/test/rest/pojo/presentationRequest/Data.java @@ -13,8 +13,8 @@ public class Data { private String mCredentialDefId; @SerializedName("id") private String mId; - @SerializedName("presentationId") - private String mPresentationId; + @SerializedName("proofRecordId") + private String mproofRecordId; @SerializedName("presentationMessage") private String mPresentationMessage; @SerializedName("schemaId") @@ -58,12 +58,12 @@ public class Data { mId = id; } - public String getPresentationId() { - return mPresentationId; + public String getProofRecordId() { + return mproofRecordId; } - public void setPresentationId(String presentationId) { - mPresentationId = presentationId; + public void setProofRecordId(String proofRecordId) { + mproofRecordId = proofRecordId; } public String getPresentationMessage() { diff --git a/src/main/resources/REST/schemas/Proof_GET_find_proof_presentation.json b/src/main/resources/REST/schemas/Proof_GET_find_proof_presentation.json index fadfeb8307830fb4cdc7bc9d35efe2da4645f42b..eb9ee7f9fbfecdefbd7c5819840132fdaa5f8670 100644 --- a/src/main/resources/REST/schemas/Proof_GET_find_proof_presentation.json +++ b/src/main/resources/REST/schemas/Proof_GET_find_proof_presentation.json @@ -23,7 +23,7 @@ "id": { "type": "string" }, - "presentationId": { + "proofRecordId": { "type": "string" }, "connectionId": { @@ -50,7 +50,7 @@ }, "required": [ "id", - "presentationId", + "proofRecordId", "connectionId", "credentialDefId", "schemaId", diff --git a/src/main/resources/REST/schemas/Proof_POST_OOB_presentation_request.json b/src/main/resources/REST/schemas/Proof_POST_OOB_presentation_request.json index 32b549f7ca4bc5c59396e98babcb814a5836c208..6828919546d213fc6a091e393da5651dfa1b266a 100644 --- a/src/main/resources/REST/schemas/Proof_POST_OOB_presentation_request.json +++ b/src/main/resources/REST/schemas/Proof_POST_OOB_presentation_request.json @@ -14,7 +14,7 @@ "id": { "type": "string" }, - "presentationId": { + "proofRecordId": { "type": "string" }, "connectionId": { @@ -44,7 +44,7 @@ }, "required": [ "id", - "presentationId", + "proofRecordId", "connectionId", "credentialDefId", "schemaId", diff --git a/src/test/java/api/test/rest/ocm/proof/ProofStepDefinitions.java b/src/test/java/api/test/rest/ocm/proof/ProofStepDefinitions.java index bee6454b7c40aa173d25fe9739af5f18a13d7b62..a5ee034b6aa7d122f9584a0ab15e6e723a9e4fac 100644 --- a/src/test/java/api/test/rest/ocm/proof/ProofStepDefinitions.java +++ b/src/test/java/api/test/rest/ocm/proof/ProofStepDefinitions.java @@ -104,14 +104,14 @@ public class ProofStepDefinitions extends BaseStepDefinitions { I_get_all_proof_presentations_via_OCM_Api(); } - @Given("^I get proof presentations with the current presentationId via OCM Api") - public void I_get_all_proof_presentations_with_the_current_presentationId_via_OCM_Api() { - I_get_proof_presentations_with_presentationId_via_OCM_Api(restSessionContainer.getCurrentPresentation().getData().getPresentationId()); + @Given("^I get proof presentations with the current proofRecordId via OCM Api") + public void I_get_all_proof_presentations_with_the_current_proofRecordId_via_OCM_Api() { + I_get_proof_presentations_with_proofRecordId_via_OCM_Api(restSessionContainer.getCurrentPresentation().getData().getProofRecordId()); } - @Given("^I get proof presentations with presentationId \\{(.*?)\\} via OCM Api") - public void I_get_proof_presentations_with_presentationId_via_OCM_Api(String presentationId) { - currentRequest.setPath("/proof/v1/find-by-presentation-id?presentationId="+ presentationId); + @Given("^I get proof presentations with proofRecordId \\{(.*?)\\} via OCM Api") + public void I_get_proof_presentations_with_proofRecordId_via_OCM_Api(String proofRecordId) { + currentRequest.setPath("/proof/v1/find-by-presentation-id?proofRecordId="+ proofRecordId); Response response = RestClient.get(currentRequest); addRequest(currentRequest); diff --git a/src/test/resources/features/ocm/attestation/v1/schemas/GET.feature b/src/test/resources/features/ocm/attestation/v1/schemas/GET.feature index aec20ebca391ed6e933cabafd1b3423108dc156f..6ff272efd2203721790ad9cbbe94c64767ef45be 100644 --- a/src/test/resources/features/ocm/attestation/v1/schemas/GET.feature +++ b/src/test/resources/features/ocm/attestation/v1/schemas/GET.feature @@ -33,7 +33,7 @@ Feature: API - OCM - attestation - v1 - schemas GET Then the field {statusCode} contains the value {200} And the status code should be {200} And the response is valid according to the {Attestation_GET_schemas.json} REST schema - And the field {message} contains the value {Schemas fetch successfully} + And the field {message} contains the value {Schemas fetched successfully} And the field {$..count} is present and not empty @schemas @@ -46,5 +46,5 @@ Feature: API - OCM - attestation - v1 - schemas GET Then the field {statusCode} contains the value {200} And the status code should be {200} And the response is valid according to the {Attestation_GET_schemas.json} REST schema - And the field {message} contains the value {Schemas fetch successfully} + And the field {message} contains the value {Schemas fetched successfully} And the field {$.data.records} contains {1} elements \ No newline at end of file diff --git a/src/test/resources/features/ocm/proof/v1/find-by-presentation-id/GET.feature b/src/test/resources/features/ocm/proof/v1/find-by-presentation-id/GET.feature index 89a6c7ae8d2377cd7f47caab64d3274607617228..6bdbfef9960649140f1904ed53c0a553270957de 100644 --- a/src/test/resources/features/ocm/proof/v1/find-by-presentation-id/GET.feature +++ b/src/test/resources/features/ocm/proof/v1/find-by-presentation-id/GET.feature @@ -13,7 +13,7 @@ #You should have received a copy of the GNU Affero General Public License #along with this program. If not, see <http://www.gnu.org/licenses/>. -#http://localhost/ocm/proof/v1/find-by-presentation-id?presentationId={{presentation-id}} +#http://localhost/ocm/proof/v1/find-by-presentation-id?proofRecordId={{proofRecordId}} #Author: Rosen Georgiev rosen.georgiev@vereign.com #NOTE: Cannot be fully tested, because it needs connection to be made with PCM. @@ -29,14 +29,14 @@ Feature: API - OCM - proof - v1 - find-by-presentation-id GET Given we are testing the OCM Api @presentation @negative - Scenario: OCM - Proof - Get proof presentation with presentationId - Positive - Given I get proof presentations with presentationId {nonExistentId} via OCM Api + Scenario: OCM - Proof - Get proof presentation with proofRecordId - Positive + Given I get proof presentations with proofRecordId {nonExistentId} via OCM Api Then the field {statusCode} contains the value {404} And the status code should be {404} Then the field {message} contains the value {proof with proofRecordId "nonExistentId" not found.} @proof @bug-proof-25 @bug-proof-24 - Scenario: OCM - Proof - Get OOB presentation request via presentationId - Positive + Scenario: OCM - Proof - Get OOB presentation request via proofRecordId - Positive #Create a new member process connection Given an administrator generates a QR code by creating a connection with alias {member} via OCM api Then the field {statusCode} contains the value {200} @@ -58,10 +58,10 @@ Feature: API - OCM - proof - v1 - find-by-presentation-id GET Then I send out of bound presentation request with the current data via OCM Api And the status code should be {201} Then the field {statusCode} contains the value {201} - #Get the request via presentationid + #Get the request via proofRecordId And I clear the request body - Given I get proof presentations with the current presentationId via OCM Api + Given I get proof presentations with the current proofRecordId via OCM Api Then the field {statusCode} contains the value {200} And the status code should be {200} - Then the field {message} contains the value {Proof presentation fetch successfully} + Then the field {message} contains the value {Proof presentation fetched successfully} Then the field {$.data.state} contains the value {request-sent} \ No newline at end of file diff --git a/src/test/resources/features/ocm/proof/v1/find-proof-presentation/GET.feature b/src/test/resources/features/ocm/proof/v1/find-proof-presentation/GET.feature index bdf488ede48930ad34142f0e10f273622e0d982e..e07384c83c08a83ca9427a361ac67c7818fdb8cf 100644 --- a/src/test/resources/features/ocm/proof/v1/find-proof-presentation/GET.feature +++ b/src/test/resources/features/ocm/proof/v1/find-proof-presentation/GET.feature @@ -29,7 +29,7 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET Given I get all proof presentations via OCM Api Then the field {statusCode} contains the value {200} And the status code should be {200} - Then the field {message} contains the value {Proof presentation fetch successfully} + Then the field {message} contains the value {Proof presentations fetched successfully} And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema @proof @@ -37,7 +37,7 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET Given I get all proof presentations with pageSize {5} and page {0} via OCM api Then the field {statusCode} contains the value {200} And the status code should be {200} - Then the field {message} contains the value {Proof presentation fetch successfully} + Then the field {message} contains the value {Proof presentations fetched successfully} And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema And the field {$.data.records} contains {5} elements @@ -46,6 +46,6 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET Given I get all proof presentations with pageSize {9999} and page {999} via OCM api Then the field {statusCode} contains the value {200} And the status code should be {200} - Then the field {message} contains the value {Proof presentation fetch successfully} + Then the field {message} contains the value {Proof presentations fetched successfully} And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema And the field {$.data.records} contains {0} elements \ No newline at end of file diff --git a/src/test/resources/features/ocm/proof/v1/send-out-of-band-presentation-request/POST.feature b/src/test/resources/features/ocm/proof/v1/send-out-of-band-presentation-request/POST.feature index b4cae435093cf15a0ee34759148c0f1b7113be14..e12ba5ceabddb9e638b66fbe99a927d9c56104e3 100644 --- a/src/test/resources/features/ocm/proof/v1/send-out-of-band-presentation-request/POST.feature +++ b/src/test/resources/features/ocm/proof/v1/send-out-of-band-presentation-request/POST.feature @@ -52,7 +52,7 @@ Feature: API - OCM - proof - v1 - send-out-of-band-presentation-request POST Then I send out of bound presentation request with the current data via OCM Api And the status code should be {201} Then the field {statusCode} contains the value {201} - Then the field {message} contains the value {Presentation request send successfully} + Then the field {message} contains the value {Presentation request sent successfully} Then the field {$.data.credentialDefId} contains the value {} Then the field {$.data.status} contains the value {request-sent} And the response is valid according to the {Proof_POST_OOB_presentation_request.json} REST schema @@ -64,7 +64,7 @@ Feature: API - OCM - proof - v1 - send-out-of-band-presentation-request POST Then I send out of bound presentation request via OCM Api And the status code should be {201} Then the field {statusCode} contains the value {201} - Then the field {message} contains the value {Presentation request send successfully} + Then the field {message} contains the value {Presentation request sent successfully} Then the field {$.data.credentialDefId} contains the value {} Then the field {$.data.status} contains the value {request-sent} And the response is valid according to the {Proof_POST_OOB_presentation_request.json} REST schema