StreetCode icon indicating copy to clipboard operation
StreetCode copied to clipboard

[API][Admin/New Streetcode] Fields Status, Alias, Sources during creation/update accept invalid data

Open iskoryk opened this issue 1 year ago • 2 comments
trafficstars

Environment: all Reproducible: always Build found: a7d807f

Preconditions

  1. Open Postman.
  2. Choose the POST/PUT method.
  3. Enter valid endpoints.
  4. 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
Screenshot 2024-04-03 at 11 56 15

User story: #115, #125

iskoryk avatar Apr 03 '24 09:04 iskoryk