Skip to content
Snippets Groups Projects
Commit b03ad9d3 authored by Rosen Georgiev's avatar Rosen Georgiev
Browse files

Merge branch 'getCredentialByFilters' into 'main'

code review comments fix

See merge request !23
parents 196e53fc 646a7659
No related branches found
No related tags found
1 merge request!23code review comments fix
Pipeline #61243 failed with stage
in 13 minutes and 51 seconds
......@@ -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() {
......
......@@ -23,7 +23,7 @@
"id": {
"type": "string"
},
"presentationId": {
"proofRecordId": {
"type": "string"
},
"connectionId": {
......@@ -50,7 +50,7 @@
},
"required": [
"id",
"presentationId",
"proofRecordId",
"connectionId",
"credentialDefId",
"schemaId",
......
......@@ -14,7 +14,7 @@
"id": {
"type": "string"
},
"presentationId": {
"proofRecordId": {
"type": "string"
},
"connectionId": {
......@@ -44,7 +44,7 @@
},
"required": [
"id",
"presentationId",
"proofRecordId",
"connectionId",
"credentialDefId",
"schemaId",
......
......@@ -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);
......
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment