ita-social-projects / StreetCode

MIT License
19 stars 9 forks source link

[API] [Donate button] The receipt is generated using the fault data #1313

Open BDaria opened 8 months ago

BDaria commented 8 months ago

Environment: Windows 11, Chrome, 123.0.6312.59 (64 bit). Reproducible: always. Build found: https://github.com/ita-social-projects/StreetCode/commit/3341e9b232e208d4032458fff8bde82b866c6b37

Preconditions

  1. Open Postman
  2. Use Post method
  3. Use request body: { "amount": 0, "redirectUrl": "string" }
  4. Use any Streecode URL (e.g.: Роман Ратушний)
Steps to reproduce Header Header Header Header
Actions Actual result Expected result Status
1. Create payment with "0" in the "amount" field and valid url Status 200 ok, the receipt is not generated Status 400. Bad request Fail
2. Create payment with empty field "url" Status 200 ok, the receipt is generated Status 400. Bad request Fail
3. Create payment with random symbols in "url" field Status 200 ok, the receipt is not generated Status 400. Bad request Fail
4. Create payment with invalid url, without "https://" Status 200 ok, the receipt is not generated Status 400. Bad request Fail
5. Create payment with random correct url Status 200 ok, the receipt is generated Status 400. Bad request Fail

User story and test case links "User story #78

sashapanasiuk5 commented 1 month ago

Fixed in https://github.com/ita-social-projects/StreetCode/issues/308

mozhaieva commented 1 month ago

When sending invalid 'amount' - 0 the wrong error message in respond appears: "'Посилання переадресації' має бути більше ніж 0" instead "'Сума' має бути більше ніж 0".

Знімок екрана 2024-10-25 о 11 45 59