Create Gherkin tests for Device Swap API#23
Conversation
bigludo7
left a comment
There was a problem hiding this comment.
Thanks
3 comments for your appreciation.
| @check_device_swap_6_no_device_swap_no_max_age | ||
| Scenario: Check that the response shows that the device has not been swapped - maxAge is not provided in the request parameter | ||
| Given a valid phone number identified by the token or provided in the request body | ||
| And the device has never been swapped |
There was a problem hiding this comment.
It works except if we the sim has been installed on the device for less than 240 hours - in this case I expect an answer true
So probably add
and the sim card is associated with this device for more than 240 hours
| @check_device_swap_7_no_device_swap_with_max_age | ||
| Scenario Outline: Check that the response shows that the device has never been swapped - maxAge is provided in the request | ||
| Given a valid phone number identified by the token or provided in the request body | ||
| And the device has never been swapped |
There was a problem hiding this comment.
Idem previous - should we add that the link sim-device is also anterior?
| Given I want to test "checkDeviceSwap" for a user who has a phone number that has never been activated in the network | ||
| And this phone number is provided in the request body | ||
| When the request "checkDeviceSwap" is sent | ||
| Then the response status code is 200 |
There was a problem hiding this comment.
We're not falling in this case: In case the phone number has never been installed in a device, or no data is available in the operators records (e.g. database error), API will return a 422 error ?
There was a problem hiding this comment.
That was a duplicated test case, in fact actual testcase is below (check_device_swap_8_NoDeviceSwapPhoneNumberNeverConnected). Wrong one is now deleted
|
What type of PR is this?
What this PR does / why we need it:
Including test proposal for Device Swap 0.1.0
Which issue(s) this PR fixes:
Fixes #20