ita-social-projects / StreetCode

MIT License
14 stars 8 forks source link

[Admin/StreetCode/Video] [API] The admin can add video without title text and title without main text. Add disable to video and body text fields if no title is added #1367

Open SophiaMRI opened 2 months ago

SophiaMRI commented 2 months ago

Environment: All Reproducible: Always Build found: a7d807f

Preconditions [front]

  1. The admin side is open.
  2. The StreetCode page has been opened to edit an existing StreetCode or to access the 'create new-streetcode' page.
Steps to reproduce Actual result Expected result
1) [Main text]
1. Scroll down to the 'Заголовок' field.
2. Fill in the 'Основний текст' field (e.g. "Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam").
2. Fill in all required fields.
3. Click the 'Зберегти як чернетку' or the 'Опублікувати' button.
The StreetCode has been created with the 'Основний текст' field filled.
The main text is not present on the front.
The 'Основний текст' field is disabled if no title is added.
2) [Video]
1. Scroll down to the 'Відео' field.
2. Fill in the 'Відео' field (e.g. "youtube.com/watch?v=2g5xkLqIElU&ab_channel=tameimpalaVEVO").
2. Fill in all required fields.
3. Click the 'Зберегти як чернетку' or the 'Опублікувати' button.
The StreetCode has been created with the 'Відео' field filled.
The video is not present on the front.
The 'Відео' field is disabled if no title is added.

Preconditions [back]

  1. Postman is open.
  2. The right method is chosen.
  3. Valid endpoints have been written.
  4. All required data has been added to the body.
Steps to reproduce Actual result Expected result
1) [Main text]
1. Add some text in the 'textContent' key (e.g. "Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam").
2. Click the 'Send' button.
1. The 200 status returned in the response.
2. The main text is not present on the front.
The '400 Bad Request' status, with the message 'The "title" key is empty,' is returned in the response.
2) [Video]
1. Add a YouTube link to the "videos"->"url" key (e.g. "youtube.com/watch?v=2g5xkLqIElU&ab_channel=tameimpalaVEVO").
2. Click the 'Send' button.
1. The 200 status returned in the response.
2. The video is present on the front without the title.
The '400 Bad Request' status, with the message 'The "title" key is empty,' is returned in the response.

Actual result Video0 Video02 Video01

Expected result Video03

User story and test case links User story #122 [Test cases] #1372 #1373

SophiaMRI commented 1 month ago

The admin can add main text without a title in the backend 1717414060067 User 1 - Anki

SophiaMRI commented 1 month ago

The admin can add a video without a title, but it's not displayed on the front end. A status code of 200 is returned instead of 400.