Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

add unit test coverage for PanelService

Đang mở Phù hợp với người mới
#6,262 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@anthonychengit đang làm issue này rồi.

Từ ngày 10/7/2026.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
frontend, testing

Hướng nghiên cứu

Đọc frontend/src/app/workspace/service/panel/panel.service.ts và làm theo kiểu describe/it/expect đơn giản trong size-formatter.util.spec.ts. Thêm frontend/src/app/workspace/service/panel/panel.service.spec.ts, sau đó chạy ng test. Hoàn tất có nghĩa là resetPanels() và closePanels() mỗi hàm phát một lần trên stream riêng của mình và không bao giờ phát trên stream còn lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

starter-task
Task Summary

Add panel.service.spec.ts covering PanelService, a tiny event bus that exposes two Subject<void> streams (closePanelStream, resetPanelStream) with closePanels() / resetPanels() triggers.

Background

frontend/src/app/workspace/service/panel/panel.service.ts is a dependency-free service (instantiable directly via new PanelService()), so no TestBed wiring is required.

get resetPanelStream() { return this.resetPanelSubject.asObservable(); }
resetPanels() { this.resetPanelSubject.next(); }
get closePanelStream() { return this.closePanelSubject.asObservable(); }
closePanels() { this.closePanelSubject.next(); }

Behavior to pin

Scenario Contract
subscribe resetPanelStream, call resetPanels() subscriber fires exactly once
subscribe closePanelStream, call closePanels() subscriber fires exactly once
stream independence calling resetPanels() does not emit on closePanelStream, and vice-versa

Subscribe to the stream, invoke the trigger, and assert the emission count (e.g. increment a counter in the subscription). Follow size-formatter.util.spec.ts for the plain describe/it/expect style (ng test).

Scope

  • New spec: frontend/src/app/workspace/service/panel/panel.service.spec.ts.
  • No production-code changes.
Task Type
  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other
Ngôn ngữ chính
Scala
Star
322
Fork
195
Merge trung bình
2 ngày 14 giờ
Pull request đã merge (30 ngày)
136

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/texera

Tất cả issue của apache/texera

Issue tương tự

Thêm issue về Scala

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.