ita-social-projects / StreetCode

MIT License
19 stars 8 forks source link

[API][Contact-us][Email] The message is sent even when the required email field is left empty or filled in the inappropriate format #1658

Open mozhaieva opened 2 months ago

mozhaieva commented 2 months ago

Environment: Postman Reproducible: Always Build found: 79fb490

Preconditions

  1. Postman is opened.
  2. The POST method is chosen
  3. Valid endpoint https://stageback.streetcode.com.ua/api/email/send has been written
  4. All required data has been added to the body: { "from": "string", "content": "string", "token": "string" }
Steps to reproduce Actual result Expected result Status
1. Leave the email field empty and click the 'Send' button. 200 OK 400 Bad request
Message "The Email field is required"
Fail
2. Enter the email without a dot in a domain name and click the 'Send' button (e.g. "test_email@ukrnet"). 200 OK 400 Bad request
Message "An inappropriate format in email field"
Fail
3. Enter the email without "@" before the domain name and click the 'Send' button (e.g. "test_emailukr.net"). 200 OK 400 Bad request
Message "An inappropriate format in email field"
Fail

Image

Image

Image

User story #140

sashapanasiuk5 commented 2 weeks ago

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