Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Client and Server: Input checks before data sent to server and server check input legitimate #71

Open
nikobatzi1990 opened this issue Apr 2, 2023 · 2 comments

Comments

@nikobatzi1990
Copy link
Contributor

nikobatzi1990 commented Apr 2, 2023

Write some tests to check that the input values are legitimate before adding them to the database (i.e., check that the Email input is actually an email address instead of random letters). #112 #114 #113

All of the fields should be filled in before submission (no leaving Nickname empty, for example). #95

@SirrorsMoore1975
Copy link
Contributor

SirrorsMoore1975 commented Apr 2, 2023

[Refactored Comment]
Client Side:

  1. Username: characters that cannot be used, must not existed 255 characters (or much lesser) and cannot be empty Feat: Nickname or username cannot be empty #114
  2. Email: required domain name, dot co or dot com, email's name, all character must be in lowercase and no special characters, Feat: Check email validity at client level #112
  3. Dropdown menu: alert user when user did not select any company brand, ie. companyName !== "" <-- (EDIT) 20231128 Future me: When user click the review button at the provider page, the user would be expecting the review is for that phone provider
  4. Add an alert window to confirm user choices / alert user with error(s) on screen Feature: Review Form: Warn users and provide final confirmation to review #95

Server Side:
Taiga's team seems to have implement some test on checking the validity of email, whether input fields are empty or whether the score is a Number.

@TaylorC19
Copy link
Collaborator

Add checks within the /api/review post endpoint.
These test should
-check that the email is in an email format (could also use type='email' in the input component).
-check the score numbers are valid
-profanity filter for reviews/names

if review is invalid, return falsey statement

@SirrorsMoore1975 SirrorsMoore1975 changed the title Express: Make Tests for Input Test: Client and Server: Input checks before data sent to server and server check input legitimate Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants