From 93c716091d118e8c37e6176e345b2b0e7cd1e6db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ann=20Kilzer=20=E3=82=AD=E3=83=AB=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E6=9D=8F?= Date: Thu, 11 Jul 2024 12:07:37 +0900 Subject: [PATCH] Update CONTRIBUTING.md (#54) update contributing instructions --- CONTRIBUTING.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bd0f7da..7c44dc2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,13 +16,14 @@ I've set us up with a modern frontend tech stack so that we can practice together. This includes TypeScript, which has a bit of a learning curve. ## Best Practices -- Use Editorconfig to match expected style: https://editorconfig.org/ +- Use Editorconfig to match expected style: https://editorconfig.org/ (If you are a VSCode user this means installing an extention) - This project is set up with eslint for both style and code checking ๐Ÿงน +- Please disable Prettier plugins in your editor ([VSCode instructions](https://stackoverflow.com/a/75471109/1860768)) ## Working on an Issue โ˜‘๏ธ - Please assign yourself to any ticket you are working on. Please unassign yourself if you aren't able to move it forward. Feel free to ask for help if you get stuck. - Branch name should start with the ticket number, e.g. `11-dns-setup` -- Please write unit tests for new enhancements ๐Ÿงช +- Please write unit and E2E tests for new enhancements ๐Ÿงช ## PR Guidelines - All GH Actions should pass โ˜‘๏ธ @@ -32,6 +33,12 @@ I've set us up with a modern frontend tech stack so that we can practice togethe - Try to keep PRs under 500 lines of code ๐Ÿค - Making multiple PRs to solve a single issue is okay! ๐Ÿ™†๐Ÿปโ€โ™€๏ธ +## Testing Guidelines +- Unit tests have coverage metrics. 60 - 80% coverage is good โญ +- Try to approach writing tests the way a real user would interact with the site. [See Guiding Principles from Testing Library](https://testing-library.com/docs/guiding-principles/) +- Rather than adding test ids, we prefer semantic selectors like `getByRole`, `getByLabel`, or `getByText` +- Playwright is great for testing complex interactions across components or pages. + ## Merging - Merging to main triggers a deploy to production. Please check that the site deploys correctly