Add component tests for the sign-up and log-in form
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- react, typescript
Research direction
Start with apps/web/src/components/AuthForm.tsx for the login/register behaviour and apps/web/src/lib/api.ts for the client to mock. Check whether the test setup from #108 is merged before writing anything, since the issue says to ask there if it is not. Done means at least 8 meaningful Vitest and Testing Library tests that pass under npm test and in CI, with no fixed waits.
Written by the indexing model from the issue text.
Description
Difficulty: Intermediate · Estimated size: 1 day
Context
apps/web/src/components/AuthForm.tsx handles both log in and register, validation messages and the consent line. It has no unit tests. This depends on the web test setup in #108.
Problem or goal
Cover the form's behaviour with component tests so future changes do not break sign-up.
Suggested approach
- Use Vitest and Testing Library (set up in #108).
- Test: required fields, invalid email, short password, the register-only username field, the consent line with working links, the busy state, and that the error from a failed request is shown and announced.
- Mock the API client, not
fetch.
Where to look
apps/web/src/components/AuthForm.tsxapps/web/src/lib/api.ts
Acceptance criteria
- At least 8 meaningful tests, none relying on fixed waits.
- They run in
npm testand in CI.
Hints
If #108 is not merged yet, ask in that issue before starting.
How to work on it
- Comment here to claim it, so two people do not do the same work.
- Fork the repo and branch from
main(feat/short-nameorfix/short-name). Setup steps are in docs/DEVELOPMENT.md. - Keep the change focused and add tests for backend logic.
- Run
npm run typecheck,npm testandnpm run lintandnpm run formatbefore opening the pull request. - Use a Conventional Commits title (for example
feat(web): add bookmarks). More in CONTRIBUTING.md.
Stuck? Ask in this issue. Questions are welcome.
Generated by Claude Code
- Dominant language
- TypeScript
- Stars
- 6
- Forks
- 6
- Avg merge
- 1h 59m
- Merged PRs (30d)
- 59
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Haseeb-MernStack/commune
-
enhancement good first issue web
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Haseeb-MernStack/commune#141 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Haseeb-MernStack/commune#138 ·
Maintainers usually reply within 1 day
-
api good first issue tests
Difficulty 2/5 Half a day Newbie friendliness 72/100
Haseeb-MernStack/commune#132 ·
Maintainers usually reply within 1 day
-
ci good first issue tests
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Haseeb-MernStack/commune#133 ·
Maintainers usually reply within 1 day
-
accessibility good first issue web
Difficulty 2/5 Half a day Newbie friendliness 74/100
Haseeb-MernStack/commune#117 ·
Maintainers usually reply within 1 day
All issues in Haseeb-MernStack/commune
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
agent-canvas bug oh-gpt-fleet priority:medium ready-for-dev UI/UX
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
good first issue javascript test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
writerslogic/scrivener-mcp#272 ·
Maintainers usually reply within 1 day
-
bug triaged tui ux wontfix
Difficulty 2/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day