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_id 12 |
bigint | int8 |
yes |
In this assignment, there are three components that require tests:
ShoppingLists
ShoppingList
ShoppingListForm
New components will need to be written along with their tests:
ShoppingListItem
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.
- Your pull request must be passing CI.
- Tests should exercise each property passed to a component.
- Use
data-testid
to identify elements. - Each test should have a single or minimal assertions, but never zero.
- Each test should clearly state what it intends to verify.
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 |