StreetCode
StreetCode copied to clipboard
[API][StreetCode/URL/Images] The admin can create a StreetCode without a required photo/Character and language validation isn't present
Environment: All Reproducible: Always Build found: 61192c2, a7d807f
Requirements: The "URL" field accepts a maximum of 100 symbols: only small Latin letters, numbers, and special character "-". Each URL must be unique.
Preconditions:
- Postman is open.
- Choose the POST/PUT method.
- Enter valid endpoints.
| Issue | Steps to reproduce | Actual result | Expected result |
|---|---|---|---|
| 1. Mandatory [black&white photo] ["alt": "1"] |
1. Add the StreetCode with a colorful photo ("alt": "0") but without the "black&white photo" and click the 'Send' button. 2. Clear the "alt" string or leave the value empty and click the 'Send' button. |
1. The StreetCode is created with a colorful photo (a black&white photo is a mandatory/update the same if delete the photo). 2. The "200 OK" status is in the response, but the photo has been deleted on the frontend. |
1. The response returns a '400 Bad Request' status, along with the message 'The "alt": "1" string is required'. 2. The response returns a '400 Bad Request' status, along with the message 'The "alt" value is invalid'. |
| 2. Validation [URL] ["transliterationUrl"] |
1. Enter the invalid data in the "transliterationUrl" key (e.g. "‹ TEST ›", “ ”‚ "тетс 1*2", "Sunny", "гщц", 101 symbols, 105 symbols). 2. Add all necessary data in the body ("index", "title", "streetcodeType", "eventStartOrPersonBirthDate", "dateString", "teaser" and "imagesIds & imagesDetails"). 3. Click on the 'Send' button. |
1. The system accepts URLs with capital Latin letters, characters beyond Latin letters, special characters (despite the valid special character "-"), 101 and more symbols, spaces, and empty key. 2. The "200 OK" status is in the response. |
The response returns the '400 Bad Request' status, along with the message 'There is no valid "transliterationUrl" value'. The StreetCode is not created. |
Attachments of actual results for URL key:
- URL with capital Latin letter
-
URL with invalid non-Latin letters
-
URL with 101 symbols and 105 symbols (more than limitation)
-
URL with space
-
URL with other special characters
-
URL with empty key
User stories: #20, #115 Test Case: #462