Skip to content

Commit

Permalink
Update OTPvalidationAPI.feature
Browse files Browse the repository at this point in the history
  • Loading branch information
bigludo7 authored Jul 11, 2024
1 parent 4753fab commit 93a7e07
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions code/Test_Definitions/OTPvalidationAPI.feature
Original file line number Diff line number Diff line change
Expand Up @@ -240,25 +240,14 @@ Scenario: Validation for sucess validate-code scenario without x-correlator
# 404 errors for send_code
###########################

@OTPvalidationAPI_404.1_send_code_resource_not_found
Scenario: resource not found
Given the request body property "$.phoneNumber" is set to config_var: "phone_number"
And the request body property "$.message" is set to config_var: "message"
And the resource "/one-time-password-sms/send-code"
When the HTTP "POST" request is sent
Then the response property "$.status" is 404
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response property "$.message" contains a user friendly text


@OTPvalidationAPI_404.2_send_code_phone_number_not_belong_to_operator
@OTPvalidationAPI_404.1_send_code_phone_number_not_belong_to_operator
Scenario: Validation for failed scenario for a phone number that did not belong to the operator
Given the request body property "$.phoneNumber" is set to a phone number that did not belong to the operator
And the request body property "$.message" is set to config_var: "message"
And the resource "/one-time-password-sms/v0/send-code"
When the HTTP "POST" request is sent
Then the response property "$.status" is 404
And the response property "$.code" is "ONE_TIME_PASSWORD_SMS.UNKNOWN_PHONE_NUMBER"
And the response property "$.code" is "DEVICE_NOT_FOUND"
And the response property "$.message" contains a user friendly text
And the response header "x-correlator" has same value as the request header "x-correlator"

Expand Down Expand Up @@ -488,6 +477,7 @@ Scenario: Validations for verification failed validate-code scenario whe maximu
And the resource "/one-time-password-sms/validate-code"
When the HTTP "POST" request is sent
Then the response property "$.status" is 404
And the response property "$.code" is NOT_FOUND"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response property "$.message" contains a user friendly text
Expand Down

0 comments on commit 93a7e07

Please sign in to comment.