{"id":15590303,"url":"https://github.com/adam-robson/react-testing","last_synced_at":"2025-04-09T13:49:31.722Z","repository":{"id":122988209,"uuid":"590158474","full_name":"Adam-Robson/react-testing","owner":"Adam-Robson","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-02T23:40:49.000Z","size":268,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-10-28T11:32:23.436Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adam-Robson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-01-17T19:29:55.000Z","updated_at":"2024-06-25T17:14:46.000Z","dependencies_parsed_at":"2024-02-03T00:31:14.120Z","dependency_job_id":"66aa9b4f-66f9-4355-9e52-77ccdb7c0631","html_url":"https://github.com/Adam-Robson/react-testing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"alchemy-adv-fullstack/adv-fullstack-react-testing-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-Robson%2Freact-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-Robson%2Freact-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-Robson%2Freact-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-Robson%2Freact-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adam-Robson","download_url":"https://codeload.github.com/Adam-Robson/react-testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223221316,"owners_count":17108514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T23:21:13.217Z","updated_at":"2024-11-05T18:07:19.245Z","avatar_url":"https://github.com/Adam-Robson.png","language":"JavaScript","readme":"# React Testing - Shopping List\n\n## Demo\n\n[Whisker Watcher with tests](https://github.com/alchemy-adv-fullstack/adv-fullstack-react-testing-demo)\n\n## Getting Started\n\nUse [this\ntemplate](https://github.com/alchemy-adv-fullstack/adv-fullstack-react-testing-template)\nto get started.\n\nCopy your `.env.example` to `.env`. You can do this using `cp .env.example .env`\nfrom your terminal. Do not move or delete `.env.example`.\n\nYou will need to setup two Supabase tables, listed below. These tables will need\nRLS (Row Level Security) disabled.\n\n`anon-shopping-lists` with the following columns:\n\n| name         | data type                | format        | nullable |\n|--------------|--------------------------|---------------|----------|\n| `id`         | bigint                   | `int8`        | no       |\n| `created_at` | timestamp with time zone | `timestamptz` | no       |\n| `name`       | character varying        | `varchar`     | no       |\n|              |                          |               |          |\n\nAnd then `anon-shopping-list-items` with the following columns:\n\n| name                       | data type                | format        | nullable |\n|----------------------------|--------------------------|---------------|----------|\n| `id`                       | bigint                   | `int8`        | no       |\n| `created_at`               | timestamp with time zone | `timestamptz` | no       |\n| `item_name`                | character varying        | `varchar`     | no       |\n| `quantity`                 | bigint                   | `int8`        | no       |\n| `shopping_list_id`[^1][^2] | bigint                   | `int8`        | yes      |\n\n[^1]: Note that `shopping_list_id` is nullable. This is to keep it compatible with\nprior assignments that might also use this table.\n\n[^2]: Additionally, `shopping_list_id` needs to be setup as a foreign key to\n`anon-shopping-lists` by the `id` field.\n\n## Description\n\nIn this assignment, there are three components that require tests:\n\n1. `ShoppingLists`\n2. `ShoppingList`\n3. `ShoppingListForm`\n\nNew components will need to be written along with their tests:\n\n1. `ShoppingListItem`\n2. `ShoppingListItemForm`\n\nThe `ConfirmationButton` has tests that demonstrate its usage and prove its\nfunctionality. This is useful for both of the `*Form` components, but not\nrequired.\n\n## Acceptance Criteria\n\n1. Your pull request must be passing CI.\n2. Tests should exercise each property passed to a component.\n3. Use `data-testid` to identify elements.\n4. Each test should have a single or minimal assertions, but never zero.\n5. Each test should clearly state what it intends to verify.\n\n## Rubric\n\n| Task                                                                  | Points |\n|-----------------------------------------------------------------------|--------|\n| `ShoppingLists` tests implemented                                     | 2      |\n| `ShoppingList` tests implemented                                      | 3      |\n| `ShoppingListForm` tests implemented                                  | 3      |\n| `ShoppingListItem` component implemented                              | 4      |\n| `ShoppingListItem` tests implemented                                  | 4      |\n| `ShoppingListItemForm` component implemented                          | 4      |\n| `ShoppingListItemForm` tests implemented                              | 3      |\n| Stretch: Use `ConfirmationButton` to implement `ShoppingListItemForm` | 2      |\n| Stretch: Add and test delete functionality for `ShoppingLists`        | 5      |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-robson%2Freact-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadam-robson%2Freact-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-robson%2Freact-testing/lists"}