StreetCode
StreetCode copied to clipboard
[API][Admin/New Streetcode] Fields Status, Alias, Sources during creation/update accept invalid data
trafficstars
Environment: all Reproducible: always Build found: a7d807f
Preconditions
- Open Postman.
- Choose the POST/PUT method.
- Enter valid endpoints.
- Check-in all mandatory keys for creating/updating Streetcode or Sources.
| Issue | Steps to reproduce | Actual result | Expected result | Status |
|---|---|---|---|---|
| 1. Fields "Status" | 1. Enter: 1.1. -1, 1.2. 2. Click the button Send. |
'200 OK' Streetcode is created/updated with "Drafted" status. | The response returns a status of "400 Bad Request" with the message "The field "Status" can contain only 0, or 1, or 2. | Fail |
| 2. Fields "Alias/Короткий опис" | 1. Enter 50 characters. 2. Click the button Send. |
'200 OK' Streetcode is created/updated. | The response returns a status of "400 Bad Request" with the message "The field "Alias" can contain 33 characters or less". | Fail |
| 3. Fields "Sources" | 1. Enter 100 characters in the title key. 2. Click the button Send. |
'200 OK' status is created/updated. | The response returns a status of "400 Bad Request" with the message "The key "title" of Status can contain 23 characters or less". | Fail |
| 4. Fields "Sources" | 1. Enter 101 characters in the title key. 2. Click the button Send. |
'200 OK' but the new status is not displayed on the front end. | The response returns a status of "400 Bad Request" with the message "The key "title" of Status can contain 23 characters or less". | Fail |
User story: #115, #125