Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update device-swap-check.feature #29

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions code/Test_definitions/device-swap-check.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ Feature: CAMARA Device Swap API, 0.1.0 - Operation checkDeviceSwap
| 12 |

@check_device_swap_4_more_than_240_hours
Scenario: Check that the response shows that the device has not been swapped when the last swap was more than 240 hours ago
Scenario: Check that the response shows that the device has not been swapped when "maxAge" is not set and the last swap was more than 240 (default) hours ago
Given a valid phone number identified by the token or provided in the request body
And the request body property "maxAge" is not setted
And the device has been swapped more than 240 hours ago
When the request "checkDeviceSwap" is sent
Then the response status code is 200
Expand Down Expand Up @@ -82,7 +83,7 @@ Feature: CAMARA Device Swap API, 0.1.0 - Operation checkDeviceSwap
Given a valid phone number identified by the token or provided in the request body
And the device has never been swapped
And the sim card has been associated with this device for more than "<hours>" hours
And the request body property "maxAge" is set to a value equal or greater than "<hours>" within the allowed range
And the request body property "maxAge" is set to a value less than "<hours>" within the allowed range
When the request "checkDeviceSwap" is sent
Then the response status code is 200
And the value of response property "$.swapped" == false
Expand Down Expand Up @@ -189,7 +190,7 @@ Feature: CAMARA Device Swap API, 0.1.0 - Operation checkDeviceSwap

@check_device_swap_400.2_invalid_max_age
Scenario: Check that the response shows an error when the max age is invalid
Given the request body property "$.maxAge" does not comply with the OAS schema at "/components/schemas/CreateCheckSimSwap"
Given the request body property "$.maxAge" does not comply with the OAS schema at "/components/schemas/CreateCheckDeviceSwap"
When the request "checkDeviceSwap" is sent
Then the response status code is 400
And the response property "$.status" is 400
Expand Down