From fb66c1ba32a904d3832ecdf8d07e653689d64bf5 Mon Sep 17 00:00:00 2001 From: Sagar Khole <sagar.khole@ayanworks.com> Date: Fri, 20 May 2022 13:44:59 +0530 Subject: [PATCH] Connection manager BDD updated --- .../connection/findByConnectionId.feature | 8 ++--- features/connection/getConnection.feature | 17 ++++------ .../connection/makeConnectionTrusted.feature | 23 ++++++------- .../connection/membershipCredential.feature | 34 +++++++++---------- 4 files changed, 38 insertions(+), 44 deletions(-) diff --git a/features/connection/findByConnectionId.feature b/features/connection/findByConnectionId.feature index 7c9930e..ab8a278 100644 --- a/features/connection/findByConnectionId.feature +++ b/features/connection/findByConnectionId.feature @@ -2,16 +2,16 @@ Feature: Get connection details By Id Return the single connection details Scenario: Provide valid connection ID - Given The connection ID available. + Given The connection ID available on agent database. When provide valid connection ID. Then should return connection details. Scenario: Provide invalid connection ID. Given The connection ID available. When provide invalid connection ID. - Then should return no data found. + Then should return no data found with satus code 404(Not Found). Scenario: Not Provide a connection ID. - Given The connection ID not available. + Given The connection ID available. When not provide connection ID. - Then should return connection request required Connction ID. \ No newline at end of file + Then should return connection request required Connction ID with satus code 400. \ No newline at end of file diff --git a/features/connection/getConnection.feature b/features/connection/getConnection.feature index 23bf1d7..b1fbcc8 100644 --- a/features/connection/getConnection.feature +++ b/features/connection/getConnection.feature @@ -1,25 +1,22 @@ Feature: Get Connection API Return the list of connections or single conneection created on OCM environment - Scenario: Provide validated page and pageSize and partcipant ID. + Scenario: Provide validated page and pageSize. When passed valid page. And passed valid pageSize. - And passed valid participant ID. Then should get connection list. - Scenario: Provide validated page and pageSize and partcipant ID. + Scenario: Provide validated page and pageSize. When passed valid page. And passed valid pageSize. - And passed valid participant ID. Then should get http status 404. Scenario: Provide invalid page and pageSize When passed invalid page. And passed invalid pageSize. - Then should return no data available. + Then should return no data available with status code 404(Not Found). - Scenario: Not Provide partcipant id OR Connction ID or participant DID - When not provid participant ID - And not provid connection ID - And nor provid partcipant DID - Then should return message "Participant ID/ connection ID / participant DID must be provided" with status code 400. + Scenario: Not Provide Connction ID or participant DID + When not provid connection ID + Then should return message "connection ID / participant DID must be provided" with status code 400. +//Need to discuess with suneet (participant DID) . \ No newline at end of file diff --git a/features/connection/makeConnectionTrusted.feature b/features/connection/makeConnectionTrusted.feature index c16f57a..c7edd16 100644 --- a/features/connection/makeConnectionTrusted.feature +++ b/features/connection/makeConnectionTrusted.feature @@ -1,17 +1,16 @@ Feature: Make connection trusted against connection ID. - Update connection status to trusted. + I want to Update connection status to trusted. - Scenario: Provide valid connection ID - Given The connection ID available. - When provide valid connection ID. + Scenario: Make connection trusted against connection ID. + Given I have pass connection ID. + When I have pass valid connection ID. Then should update current connection state to trusted state. - Scenario: Provide invalid connection ID. - Given The connection ID available. - When provide invalid connection ID. - Then should return an exception. + Scenario: Make connection trusted against connection ID. + Given I have pass connection ID. + When I have pass invalid connection ID. + Then should get http status 404(Not Found). - Scenario: Not Provide a connection ID. - Given The connection ID not available. - When not provide connection ID. - Then should return connection request required Connction ID. \ No newline at end of file + Scenario: Make connection trusted against connection ID. + Given I have not pass connection ID. + Then should return connection request required Connction ID with state code 400(Bad request). \ No newline at end of file diff --git a/features/connection/membershipCredential.feature b/features/connection/membershipCredential.feature index 15c31bb..f3ec6b5 100644 --- a/features/connection/membershipCredential.feature +++ b/features/connection/membershipCredential.feature @@ -1,25 +1,23 @@ Feature: Create connection invitation URL - Scenario: Connction Invitation URL is created successfully as member - Given The participant is registered on GAIAX ecosystem - And The Principal is set to connect with Participant - When The Participant_id is provided in URL - And Alis is set to "member" + Scenario: Create connection invitation URL + Given I have create connection invitation URL as member + When I have pass Alis as "member" Then the Connection Invitation URL should be created. - And if user accepts the connection it should go in complete state. + And if I accepts the connection it should go in complete state. - Scenario: Connction Invitation URL is created successfully as subscriber. - Given The participant is registered on GAIAX ecosystem - And The Principal is set to connect with Participant - When The Participant_id is provided in URL - And Alis is set to "subscriber" - Then the Connection Invitation URL should be created - And if user accepts the connection it should go in complete state. - Scenario: Connction Invitation URL is created successfully but not as member or subscriber. - Given The participant is registered on GAIAX ecosystem - And The Principal is set to connect with Participant - When The Participant_id is provided in URL + + Scenario: Create connection invitation URL + Given I have create connection invitation URL as subscriber + When I have pass Alis as "subscriber" Then the Connection Invitation URL should be created. - And if user accepts the connection it should go in complete state. + And if I accepts the connection it should go in complete state. + + Scenario: Create connection invitation URL. + Given I have create connection invitation URL + When I have not pass alis as a member. + When I have not pass alis as a subscriber. + And the Connection Invitation URL should be created. + And If I accepts the connection it should go in complete state. But connection will never goes in trusted state. -- GitLab