Giter VIP home page Giter VIP logo

react-testing's Introduction

React Testing - Shopping List

Demo

Whisker Watcher with tests

Getting Started

Use this template to get started.

Copy your .env.example to .env. You can do this using cp .env.example .env from your terminal. Do not move or delete .env.example.

You will need to setup two Supabase tables, listed below. These tables will need RLS (Row Level Security) disabled.

anon-shopping-lists with the following columns:

name data type format nullable
id bigint int8 no
created_at timestamp with time zone timestamptz no
name character varying varchar no

And then anon-shopping-list-items with the following columns:

name data type format nullable
id bigint int8 no
created_at timestamp with time zone timestamptz no
item_name character varying varchar no
quantity bigint int8 no
shopping_list_id12 bigint int8 yes

Description

In this assignment, there are three components that require tests:

  1. ShoppingLists
  2. ShoppingList
  3. ShoppingListForm

New components will need to be written along with their tests:

  1. ShoppingListItem
  2. ShoppingListItemForm

The ConfirmationButton has tests that demonstrate its usage and prove its functionality. This is useful for both of the *Form components, but not required.

Acceptance Criteria

  1. Your pull request must be passing CI.
  2. Tests should exercise each property passed to a component.
  3. Use data-testid to identify elements.
  4. Each test should have a single or minimal assertions, but never zero.
  5. Each test should clearly state what it intends to verify.

Rubric

Task Points
ShoppingLists tests implemented 2
ShoppingList tests implemented 3
ShoppingListForm tests implemented 3
ShoppingListItem component implemented 4
ShoppingListItem tests implemented 4
ShoppingListItemForm component implemented 4
ShoppingListItemForm tests implemented 3
Stretch: Use ConfirmationButton to implement ShoppingListItemForm 2
Stretch: Add and test delete functionality for ShoppingLists 5

Footnotes

  1. Note that shopping_list_id is nullable. This is to keep it compatible with prior assignments that might also use this table.

  2. Additionally, shopping_list_id needs to be setup as a foreign key to anon-shopping-lists by the id field.

react-testing's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.