STEP | n/n | Description | Test case Inputs | Expected result | Step by Step Script | Actual Result |
---|---|---|---|---|---|---|
Email verification | EV1 | input new correct email | email: correct | 200, email sent | input new correct email | 200, email sent |
EV2 | input empty email | email: "" | 422, "can't be blank" | input empty email | 422, "can't be blank" | |
EV3 | input email which already exists | email: correct, exists | 409 "User with this email already exists" | input email which already exists | 409 "User with this email already exists" | |
EV4 | input incorrect email | email: "123" | 422, "has invalid format" | input incorrect email | 422, "has invalid format" | |
EV5 | input few emails | email: "email1", email: "email2"200, link sent to first email | 422, "invalid request" | input few emails | 200, link sent to first email | |
Validate Email | VE1 | follow the link from email | jwt token | 200, response with new jwt token | Authorize with jwt token | 200, response with new jwt token |
VE2 | follow eхpired link from email | jwt token - expired | 409 - link has expired | Authorize with expired jwt token | 401, access denied | |
VE3 | follow the link from email after the user with this email was registered | jwt token | 409 Error 'User with this email already exists' | Authorize with already used jwt token | 200 | |
VE4 | input incorrect token | incorrect jwt token | 401, access denied | 401, access denied | ||
Get users by tax_id and email | GU1 | find user by new tax_id and new_email | jwt token - with new email received in response tax_id - new | 200 |
| 200 |
GU2 | find user by existing email and different tax_id | jwt token with existing email tax_id - valid, not matching | 409, User with such email already exists |
| 409, User with this tax_id already exists | |
GU3 | find user by existing tax_id and different email | jwt token - existing email, not matching tax_id - existing | 409, User with such tax_id already exists |
| 409, User with this tax_id already exists | |
GU4 | find user by existing and matching email and tax_id | jwt token - existing and matching email tax_id - existing and matching tax_id | 409, User with this tax_id already exists |
| 409, User with this tax_id already exists | |
GU5 | expired jwt token | jwt token - expired | 409 - link has expired |
| ||
GU6 | incorrect jwt token (token from email) | incorrect jwt token | 401, access denied |
| 401, access denied | |
GU7 | invalid DS | invalid DS | 409, invalid DS |
| ||
Send OTP | SO1 | send top | type = 'SMS' (correct) factor = '+380' (valid phone number) jwt token - valid | 200, sms sent | 200, sms sent | |
SO2 | input wrong type | type = 'EMAIL' | 422, $type | 422, $type | ||
SO3 | input wrong phone number | "factor": "2242252", "type": "SMS" | 422, factor | 200 | ||
SO3 | input incorrect jwt token | jwt from email link | 401, access denied | 401, access denied | ||
SO4 | input empty phone number | factor='' | 422, factor | 422, factor |
...