Skip to content

Anastasia Lapteva #112

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ As a developer, you will be writing tests for every component. As we've learned,

## Instructions
### Task 1: Project Set Up
* [ ] Create a forked copy of this project.
* [ ] Clone your OWN version of the repository in your terminal
* [ ] cd into the project base directory `cd web-module-project-reducer-pattern`
* [ ] Download project dependencies by running `npm install`
* [ ] Start up the app using `npm start`
- [ ] In a new terminal window, run `npm test`
- [ ] With each saved change in your editor, the test runner will re-run all the tests
- [ ] **IMPORTANT** If a test fails, use the test runner's error messages to find out why it is failing
* [X] Create a forked copy of this project.
* [X] Clone your OWN version of the repository in your terminal
* [X] cd into the project base directory `cd web-module-project-reducer-pattern`
* [X] Download project dependencies by running `npm install`
* [X] Start up the app using `npm start`
- [X] In a new terminal window, run `npm test`
- [X] With each saved change in your editor, the test runner will re-run all the tests
- [X] **IMPORTANT** If a test fails, use the test runner's error messages to find out why it is failing

### Task 2: Project Requirements
> *All of the work you will do today will be contained inside the ContactForm.test.js file. You will be tasked to write the code for at least 9 different tests on various parts of the ContactForm component. Please read the instructions for each test carefully.*
Expand All @@ -40,15 +40,17 @@ As a developer, you will be writing tests for every component. As we've learned,
* [ ] Write out a list of possible testcases for this application within Understanding-questions.md.

#### Complete a case that tests if:
* [ ] the component renders the contact form component without errors.
* [ ] the header h1 element exists. Include three asserts, if the header is in the document, if the heads is truthy, if the header has the correct test content.
* [ ] the component renders ONE error message if the user enters less than 4 characters into the firstname field. Make sure to use async / await and the correct screen method to account for state change.
* [ ] the component renders THREE error messages if the user submits without filling in any values.
* [ ] the component renders ONE error message if the user submits without filling in the email field.
* [ ] the component renders the text *"email must be a valid email address"* if an invalid email address is typed into the email field.
* [ ] the component renders the text *"lastName is a required field"* the form is submitted without a last name.
* [X] the component renders the contact form component without errors.
* [X] the header h1 element exists. Include three asserts, if the header is in the document, if the heads is truthy, if the header has the correct test content.
* [X] the component renders ONE error message if the user enters less than 4 characters into the firstname field. Make sure to use async / await and the correct screen method to account for state change.
* [X] the component renders THREE error messages if the user submits without filling in any values.
* [X] the component renders ONE error message if the user submits without filling in the email field.
* [X] the component renders the text *"email must be a valid email address"* if an invalid email address is typed into the email field.
* [X] the component renders the text *"lastName is a required field"* the form is submitted without a last name.
* [ ] the component renders the firstname, lastname and email text when submitted with valued fields and does **not** render a message value when one is not entered into the message field.
*** CONFUSED ON HOW TO TEST FOR NO RENDER
* [ ] renders all fields when the user submits with valid text filled in for all fields.
***CONFUSED ON HOW TO TEST FOR MESSAGE RENDER


## Stretch goals
Expand Down
Loading