StreetCode
StreetCode copied to clipboard
[Admin/StreetCode] [Video POST/PUT] There is no video URL validation; the admin can add not only a YouTube link
trafficstars
Environment: All Reproducible: Always Build found: a7d807f
Preconditions
- Postman is open.
- The right method is chosen.
- Valid endpoints have been written.
- All required data has been added to the body.
| Issue | Steps to reproduce | Actual result | Expected result |
|---|---|---|---|
| [POST] [Empty array] |
1. Add an empty array to the video "url" key ( [ ] ). 2. Send the request. |
The 200 status returned in the response. The 'Unexpected Application Error!' message is on the front. |
The '400 Bad Request' status, with the message 'The "url" video field is invalid,' is returned in the response. |
| [POST] [Empty key] |
1. Leave the video "url" key empty (" "). 2. Send the request. |
The 200 status returned in the response. The black disabled block in the video place is present on the front. |
The '400 Bad Request' status, with the message 'The "url" video field is invalid,' is returned in the response. |
| [POST/PUT] [Non-YouTube link] |
1. Add a non-YouTube link in the URL key (e.g. "https:/ /www.wikipedia.com.ua"). 2. Send the request. |
The 200 status returned in the response. The black disabled block in the video place is present on the front. |
The '400 Bad Request' status, with the message 'The "url" video field is invalid,' is returned in the response. |
| [POST] [Numbers] |
1. Add numbers in the video "url" key (e.g. "1234"). 2. Send the request. |
The 200 status returned in the response. The black disabled block in the video place is present on the front. |
The '400 Bad Request' status, with the message 'The "url" video field is invalid,' is returned in the response. |
| [POST/PUT] [Numbers&special characters] |
1. Add numbers and special characters in the video "url" key (e.g. "12-34*%"). 2. Send the request. |
The 200 status returned in the response. The black disabled block in the video place is present on the front. |
The '400 Bad Request' status, with the message 'The "url" video field is invalid,' is returned in the response. |
| [POST/PUT] [Letters]** |
1. Add all required data in the body. 2. Add a some word in the URL key (e.g. "string"). 2. Send the request. |
The 200 status returned in the response. The black disabled block in the video place is present on the front. |
The '400 Bad Request' status, with the message 'The "url" video field is invalid,' is returned in the response. |
User story and test case links User story #122 [Test case] #352