StreetCode icon indicating copy to clipboard operation
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

Open SophiaMRI opened this issue 1 year ago • 2 comments

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:

  1. Postman is open.
  2. Choose the POST/PUT method.
  3. 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:

  1. URL with capital Latin letter

баг, URL, 1 невалідна велика латін літера + 4 валідні мал  латери

  1. URL with invalid non-Latin letters баг, URL, 3 невалідні маленькі укр літери

  2. URL with 101 symbols and 105 symbols (more than limitation) баг, URL невалідна кількість 101 символ, стріткод створено баг, URL невалідна кількість 105 символів, стріткод створено

  3. URL with space баг, URL, валідні символи і невалідний пробіл

  4. URL with other special characters баг 2

  5. URL with empty key баг 1

User stories: #20, #115 Test Case: #462

SophiaMRI avatar Feb 05 '24 11:02 SophiaMRI