web-ui tests: enable Testing Library cleanup for every test file
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 50/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- testing
Hướng nghiên cứu
Start by reading web-ui/vitest.config.ts and web-ui/src/test/setup.ts, then inspect how test files currently call cleanup(). Decide whether to register cleanup in setup or enable globals, and check for tests that rely on state surviving between tests. Done means rendered components are cleaned up after each test, redundant per-file cleanup is removed where safe, and the test suite passes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Background
web-ui/vitest.config.ts does not enable globals, so afterEach is not global and @testing-library/react never registers its automatic cleanup. Components and hooks rendered in a test stay mounted until the file ends unless the file calls cleanup() itself.
#615 fixed one consequence: useStyleWorkspace.test.ts left three hooks mounted, and a hashchange in the last afterEach re-rendered them after jsdom was torn down. CI then reported ReferenceError: window is not defined and exited 1 although every test passed (seen on #609, #610 and main at c44d3479). Many other files already call cleanup() by hand; any file that does not has the same gap.
Proposal
Add afterEach(cleanup) to web-ui/src/test/setup.ts (or enable globals: true), then drop the per-file cleanup() calls that become redundant.
Open points
setup.tshook vs.globals: true(the latter also changes howdescribe/it/expectresolve).- Tests that rely on state surviving across tests in the same file will need checking.
- Ngôn ngữ chính
- Python
- Star
- 136
- Fork
- 13
- Merge trung bình
- 7 giờ 36 phút
- Pull request đã merge (30 ngày)
- 175
Chuẩn bị môi trường
- Không có Dockerfile hay 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 aws-samples/sample-spec-driven-presentation-maker
-
Charts: setting `valueAxis` skips theme styling of axis labels and axis linesCó thể đã có người làm @ShotaroKataoka đã nhận 1 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
aws-samples/sample-spec-driven-presentation-maker#630 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
aws-samples/sample-spec-driven-presentation-maker#622 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Charts: add radar charts (chartType "radar")Có thể đã có người làm @tridev-tej đã nhận 4 ngày trước. Đang mởenhancement good first issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
aws-samples/sample-spec-driven-presentation-maker#621 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 77/100
aws-samples/sample-spec-driven-presentation-maker#620 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make the element JSON round trip match the docs (4 small fixes)Có thể đã có người làm @Vedant-200 đã nhận 5 ngày trước. Đang mởenhancement good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
aws-samples/sample-spec-driven-presentation-maker#586 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aws-samples/sample-spec-driven-presentation-maker
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
samuelclay/NewsBlur#2214 ·
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 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
MODEL_NOT_FOUND gives no suggestion for a model listed only as model:profileCó thể đã có người làm @ShaiShmuel đã nhận hôm nay. Đang mởenhancement rust
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
superlinked/sie#985 ·
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 88/100
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 68/100
readthedocs/readthedocs-builder#73 ·
Maintainer thường phản hồi trong vòng 1 ngày