From 7bfb47f7cc1d524010c49da54fa35ebe89863739 Mon Sep 17 00:00:00 2001 From: PEDRO DIEZ GARCIA Date: Tue, 27 Aug 2024 10:56:10 +0200 Subject: [PATCH] updates_after_1st_review --- .../carrier-billing-cancelPayment.feature | 6 ++-- .../carrier-billing-confirmPayment.feature | 8 +++-- .../carrier-billing-createPayment.feature | 8 +++-- .../carrier-billing-preparePayment.feature | 34 ++++++++++--------- .../carrier-billing-validatePayment.feature | 2 ++ 5 files changed, 34 insertions(+), 24 deletions(-) diff --git a/code/Test_definitions/carrier-billing-cancelPayment.feature b/code/Test_definitions/carrier-billing-cancelPayment.feature index 781aa9a..adb0b8d 100644 --- a/code/Test_definitions/carrier-billing-cancelPayment.feature +++ b/code/Test_definitions/carrier-billing-cancelPayment.feature @@ -25,7 +25,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation cancelPayment @cancel_payment_01_generic_success_scenario Scenario: Common validations for any success scenario # Valid default request body compliant with the schema - And the request body is set to a valid request body + Given the request body is set to a valid request body When the HTTP "POST" request is sent Then the response status code is 202 And the response header "Content-Type" is "application/json" @@ -43,7 +43,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation cancelPayment @cancel_payment_03_phoneNumber_two_legged - # Case using a 2-legged Access Token. Only applicable for Countries and Telcp Operators whose regulation allows for it + # Case using a 2-legged Access Token. Only applicable for Countries and Telco Operators whose regulation allows for it Scenario: Request cancel payment indicating phoneNumber Given the request body property "$.phonenumber" is set to a valid value which is the same as associated to access token When the HTTP "POST" request is sent @@ -90,6 +90,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation cancelPayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @cancel_payment_401.02_expired_access_token Scenario: Expired access token Given the header "Authorization" is set to an expired access token @@ -100,6 +101,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation cancelPayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @cancel_payment_401.03_invalid_access_token Scenario: Invalid access token Given the header "Authorization" is set to an invalid access token diff --git a/code/Test_definitions/carrier-billing-confirmPayment.feature b/code/Test_definitions/carrier-billing-confirmPayment.feature index 4f08b21..c6e8f17 100644 --- a/code/Test_definitions/carrier-billing-confirmPayment.feature +++ b/code/Test_definitions/carrier-billing-confirmPayment.feature @@ -26,7 +26,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation confirmPayment @confirm_payment_01_generic_success_scenario Scenario: Common validations for any success scenario # Valid default request body compliant with the schema - And the request body is set to a valid request body + Given the request body is set to a valid request body When the HTTP "POST" request is sent Then the response status code is 202 And the response header "Content-Type" is "application/json" @@ -44,7 +44,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation confirmPayment @confirm_payment_03_phoneNumber_two_legged - # Case using a 2-legged Access Token. Only applicable for Countries and Telcp Operators whose regulation allows for it + # Case using a 2-legged Access Token. Only applicable for Countries and Telco Operators whose regulation allows for it Scenario: Request confirm payment indicating phoneNumber Given the request body property "$.phonenumber" is set to a valid value which is the same as associated to access token When the HTTP "POST" request is sent @@ -91,6 +91,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation confirmPayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @confirm_payment_401.02_expired_access_token Scenario: Expired access token Given the header "Authorization" is set to an expired access token @@ -101,6 +102,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation confirmPayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @confirm_payment_401.03_invalid_access_token Scenario: Invalid access token Given the header "Authorization" is set to an invalid access token @@ -147,7 +149,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation confirmPayment When the HTTP "POST" request is sent Then the response status code is 403 And the response property "$.status" is 403 - And the response property "$.code" is "PAYMENT_DENIED" + And the response property "$.code" is "CARRIER_BILLING.PAYMENT_DENIED" And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/carrier-billing-createPayment.feature b/code/Test_definitions/carrier-billing-createPayment.feature index d4d0f10..d547515 100644 --- a/code/Test_definitions/carrier-billing-createPayment.feature +++ b/code/Test_definitions/carrier-billing-createPayment.feature @@ -158,7 +158,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation createPayment @create_payment_11_amountTransaction_phoneNumber_two_legged - # Case using a 2-legged Access Token. Only applicable for Countries and Telcp Operators whose regulation allows for it + # Case using a 2-legged Access Token. Only applicable for Countries and Telco Operators whose regulation allows for it Scenario: Request 1-step payment indicating phoneNumber Given the request body property "$.amountTransaction" is set with valid required information And the request body property "$.amountTransaction.phoneNumber" is set to a valid value @@ -268,7 +268,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation createPayment @create_payment_400.06_invalid_sink Scenario: Using a invalid sink value - Given the request body property includes property "$.sink" with an HTTP endpoint + Given the request body property includes property "$.sink" which is not set to an url When the HTTP "POST" request is sent Then the response status code is 400 And the response property "$.status" is 400 @@ -307,6 +307,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation createPayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @create_payment_401.02_expired_access_token Scenario: Expired access token Given the header "Authorization" is set to an expired access token @@ -317,6 +318,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation createPayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @create_payment_401.03_invalid_access_token Scenario: Invalid access token Given the header "Authorization" is set to an invalid access token @@ -363,7 +365,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation createPayment When the HTTP "POST" request is sent Then the response status code is 403 And the response property "$.status" is 403 - And the response property "$.code" is "PAYMENT_DENIED" + And the response property "$.code" is "CARRIER_BILLING.PAYMENT_DENIED" And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/carrier-billing-preparePayment.feature b/code/Test_definitions/carrier-billing-preparePayment.feature index 951b177..e24b679 100644 --- a/code/Test_definitions/carrier-billing-preparePayment.feature +++ b/code/Test_definitions/carrier-billing-preparePayment.feature @@ -33,7 +33,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" # The response has to comply with the generic response schema which is part of the spec - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" @prepare_payment_02_generic_success_scenario_with_sink_information @@ -48,7 +48,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" # The response has to comply with the generic response schema which is part of the spec - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" @prepare_payment_03_generic_success_scenario_with_sink_and_sinkCredential_information @@ -65,7 +65,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" # The response has to comply with the generic response schema which is part of the spec - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" # Scenarios testing specific situations for amountTransaction @@ -78,7 +78,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response body property "$.amountTransaction.paymentAmount.chargingInformation.isTaxIncluded" is true @@ -90,7 +90,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response body property "$.amountTransaction.paymentAmount.chargingInformation.isTaxIncluded" is false OR not returned @@ -102,7 +102,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response body property "$.amountTransaction.paymentAmount.chargingInformation.taxAmount" has the same value as provided in the request body @@ -115,7 +115,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response body property "$.amountTransaction.paymentAmount.chargingMetaData.merchantIdentifier" has the same value as provided in the request body @@ -127,7 +127,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response body array property "$.amountTransaction.paymentAmount.paymentDetails" has the same information as provided in the request body @@ -140,7 +140,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response body property "$.amountTransaction.clientCorrelator" has the same value as provided in the request body @@ -153,7 +153,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response body property "$.amountTransaction.phoneNumber" has the same value as provided in the request body @@ -166,7 +166,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response body property "$.amountTransaction.phoneNumber" has the same value as provided in the request body @@ -178,7 +178,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response property "$.validatioInfo" is not returned And the response body property "$.paymentStatus" is "reserved" @@ -191,7 +191,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response property "$.validatioInfo" is returned And the response body property "$.paymentStatus" is "pending_validation" @@ -204,7 +204,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment Then the response status code is 201 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "/components/schemas/PaymentCreated" + And the response body complies with the OAS schema at "/components/schemas/BodyAmountReservationTransactionForReserve" And the response body property "$.paymentStatus" is "processing" @@ -282,7 +282,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment @prepare_payment_400.06_invalid_sink Scenario: Using a invalid sink value - Given the request body property includes property "$.sink" with an HTTP endpoint + Given the request body property includes property "$.sink" which is not set to an url When the HTTP "POST" request is sent Then the response status code is 400 And the response property "$.status" is 400 @@ -321,6 +321,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @prepare_payment_401.02_expired_access_token Scenario: Expired access token Given the header "Authorization" is set to an expired access token @@ -331,6 +332,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @prepare_payment_401.03_invalid_access_token Scenario: Invalid access token Given the header "Authorization" is set to an invalid access token @@ -377,7 +379,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation preparePayment When the HTTP "POST" request is sent Then the response status code is 403 And the response property "$.status" is 403 - And the response property "$.code" is "PAYMENT_DENIED" + And the response property "$.code" is "CARRIER_BILLING.PAYMENT_DENIED" And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/carrier-billing-validatePayment.feature b/code/Test_definitions/carrier-billing-validatePayment.feature index cab3523..311b904 100644 --- a/code/Test_definitions/carrier-billing-validatePayment.feature +++ b/code/Test_definitions/carrier-billing-validatePayment.feature @@ -124,6 +124,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation validatePayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @validate_payment_401.02_expired_access_token Scenario: Expired access token Given the header "Authorization" is set to an expired access token @@ -134,6 +135,7 @@ Feature: CAMARA Carrier Billing API, v0.3 - Operation validatePayment And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text + @validate_payment_401.03_invalid_access_token Scenario: Invalid access token Given the header "Authorization" is set to an invalid access token