ita-social-projects / TeachUA

The project aims to promote the Ukrainian language for study clubs in Russian-speaking regions of Ukraine. This is a web application that contains a database of clubs with the Ukrainian language of instruction. Clubs have the opportunity to register on the site and provide information about themselves. Users can search for clubs by various parameters (activity type, location, etc.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[API. Tasks] Admin can edit the task with invalid name

TetianaFilatova opened this issue · comments

Environment: Windows 10 Pro
Postman for Windows Version 10.12.10
Reproducible: always

Preconditions

  1. Run Postman
  2. Create new request > Choose 'PUT' in 'Method' drop-down
  3. Enter request URL: https://speak-ukrainian.org.ua/dev/api/challenge/task/x (You need to replace "x" in URL with the existing task ID (you can check the site or DB))
  4. Navigate to 'Authorization' tab, choose 'Bearer Token' in 'Type' drop-down
  5. Set 'accessToken' of user with admin rights (e. g. 'email': "admin@gmail.com", 'password': "admin") in 'Token' field
    TD1 "{
    "challengeId" : "62",
    "headerText" : "header text must contain min fourty letters",
    "name": " ",
    "description": " ",
    "picture": "/upload/test/test.png",
    "startDate": "2023-11-03"
    }"
    TD2 "{
    "challengeId" : "777",
    "headerText" : "header text must contain min fourty letters",
    "name": " namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%namenamename1213#$%",
    "description": " descriptiondescriptiondescriptiondescriptiondescription12345$%%^$# ",
    "picture": "/upload/test/test.png",
    "startDate": "2023-12-03"
    }"

Steps to reproduce

  1. Choose 'Body' > 'raw' > 'JSON'
  2. Create new request with TD1
  3. Click 'Send' button
  4. Pay attention to appear error message
  5. Create new request with TD2
  6. Click 'Send' button

Actual result
Task is eddited with invalid data in the "name" field

Expected result
Error message "name must contain a minimum of 5 and a maximum of 50 letters" is appeared

User story and test case links
E.g.: "User story #1335
Test case
Test case
taskFields
taskFields2
)"