Skip to content

gridu/React-Testing-Library-Tasks-And-Capstone-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

React Testing Library Course

Welcome to the React Testing Library Course repository! This repository is designed to help you build a solid foundation in testing React components using React Testing Library.

Course Overview

This repository consists of two main sections:

1. Course Tasks

In the Course-Tasks folder, you will find three tasks aimed at building your skills step by step, after you finish tasks send proof of completion for all tasks with test coverage(you need 100% to pass)

Task 1: Testing a Todo List Component

Description: Write tests using various selectors and queries (getBy, queryBy, findBy, etc.) to interact with a simple Todo List component. Additionally, use screen.debug() to inspect the DOM during testing.

Task 2: Simulating User Interactions

Description: Write tests that simulate various user interactions, such as button clicks, form input changes, and mouse events, verifying that the component's state and behavior update correctly.

Task 3: Testing Authentication Flow

Description: Write tests for a login component to verify user authentication, including input handling, API calls, and redirects. Additionally, test a protected component to ensure proper redirection for unauthenticated users.

Each task includes detailed instructions and examples to guide you through the process of writing tests for React components.

2. Capstone Project

In the Capstone-React-Testing-Library folder, you will find the Capstone Project. This project is a comprehensive, real-world example designed to test your understanding of the concepts you've learned throughout the course. The capstone project will require you to apply all the testing techniques and best practices covered in the tasks.

How to Use This Repository

  1. Fork this repository to your GitHub account.
  2. Clone your forked repository to your local machine
  3. Navigate to the Course-Tasks folder to complete the tasks.
  4. Send proof of completion for tasks, there should be all test passed and 100% of coverage
  5. Once you're comfortable with the tasks, move on to the Capstone-React-Testing-Library folder to tackle the capstone project.
  6. Follow the instructions in each folder's README for more detailed guidance.

Prerequisites

  • Basic understanding of React
  • Familiarity with JavaScript ES6+
  • Node.js installed on your machine
  • React Testing Library installed as a dependency

Getting Started

  1. Clone the repository:
    git clone https://github.com/yourusername/react-testing-library-course.git
  2. Install dependencies:
    npm install
  3. Start working through the tasks in the Course-Tasks folder or jump to the capstone project.

Happy testing!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published