Component tests for AccountToggle
Maintainer thường phản hồi trong vòng 1 ngày
@sam-zc đang làm issue này rồi.
Từ ngày 27/11/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
Hướng nghiên cứu
The component under test is src/components/AccountToggle.tsx, and the closest patterns are test/components/PRMetrics.test.tsx and DiffTrendChart.test.tsx. Read how those mount components and mock fetch with vi.fn(), then cover the loading, error (/api/accounts and /api/user/orgs failing), empty, main-content and interaction states. Done means a new test/components/AccountToggle.test.tsx passes with queries by role or label, not CSS classes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
src/components/AccountToggle.tsx (186 lines) has no component tests.
What to test
- loading state while the request is pending
- error state when
/api/accounts,/api/user/orgsfails - empty state when the API returns no data
- the main rendered content with realistic props / mocked data
- the main interactions (clicks, inputs) and what they change
How
Use React Testing Library like the tests in test/components/ (e.g. PRMetrics.test.tsx, DiffTrendChart.test.tsx). Mock fetch with vi.fn(); no real network.
Acceptance criteria
- New file
test/components/AccountToggle.test.tsx - Each case above covered; tests query by role/label, not CSS classes
- Ngôn ngữ chính
- TypeScript
- Star
- 246
- Fork
- 436
- Merge trung bình
- 9 giờ 33 phút
- Pull request đã merge (30 ngày)
- 213
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Priyanshu-byte-coder/devtrack
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Priyanshu-byte-coder/devtrack#4067 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Priyanshu-byte-coder/devtrack#4066 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalCó thể đã có người làm @Nandaninaulaa đã nhận 5 ngày trước. Đang mởgood first issue level 1 level:beginner status:assigned type:design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshCó thể đã có người làm @KartikeyG-world đã nhận 5 ngày trước. Đang mởgood first issue level 1 level:beginner status:assigned type:design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Goals: the error banner and the "No goals yet" hint show at the same timeCó thể đã có người làm @KartikeyG-world đã nhận 5 ngày trước. Đang mởgood first issue level 1 level:beginner status:assigned type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Priyanshu-byte-coder/devtrack
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Chocobozzz/PeerTube#7901 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
area:tools bug has repro
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
anthropics/claude-code#113984 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ehmpathy/declapract-typescript-ehmpathy#960 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Web UI: Pressing Ctrl+<key> with Caps Lock active triggers Ctrl+Shift+<key> shortcutsĐang mởarea/web platform/windows type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#68237 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100