StreetCode icon indicating copy to clipboard operation
StreetCode copied to clipboard

[API][Chronology block] It is possible to publish a chronological card without filling in mandatory fields, exceeding the character limit and specifying invalid data

Open iskoryk opened this issue 1 year ago • 1 comments
trafficstars

Environment: all Reproducible: always Build found: 9d8b9ea

Preconditions

  1. Open Postman.
  2. Choose the POST/PUT method.
  3. Enter valid endpoints.
Issue Steps to reproduce Actual result Expected result Status
1. Mandatory: "title", "description" 1. Fill in all mandatory keys for creating/updating Streetcode.
2. In "timelineItems" block leaves keys "title", "description", 'historicalContexts' "title" empty "".
3. Click the button Send.
Streetcode is created/ updated with empty mandatory fields in the Chronology block. The response returns a status of "400 Bad Request" with the message "Fill in the chronology card title and description with valid data." Fail
2. Mandatory: historical contexts' "title" 1. Fill in all mandatory keys for creating Streetcode.
2. Create a new historical context. Leaves key historical contexts' "title" empty "".
3. Click the button Send.
Streetcode and new historical context are created with an empty title - a mandatory field in the historical context. The response returns a '400 Bad Request' status with the message 'Fill in the title of historical context'. Fail
3. Max count:
"title",
"description"
1. Fill in all mandatory keys for creating/ updating Streetcode.
2. Add: 27 characters in the "title" key;
401 characters in the "description" key.
Streetcode is created/ updated with:
- 27 characters in the "title" field (26 are allowed);
- 401 characters in the "description" field (400 are allowed);
The response returns a status of "400 Bad Request" with the message "Fill in the chronology card title and description with valid data." Fail
4. Invalid data: "dateViewPattern" 1. Fill in all mandatory keys for creating/ updating Streetcode.
2. To "dateViewPattern" key add: -1;
1000000000.
Streetcode is created/ updated with empty mandatory fields "dateViewPattern". The response returns a status of "400 Bad Request" with the message "The timeline item "dateViewPattern" can contain only 0/1/2/3." Fail

User story and test case links User story: #124 Test case: #367, #384

iskoryk avatar Mar 25 '24 14:03 iskoryk