Skip to content

feat: add solid testing infrastructure + entity config specs - #85

Merged
buzz-code merged 11 commits into
mainfrom
feature/solid-testing
Apr 29, 2026
Merged

buzz-code merged 11 commits into
mainfrom
feature/solid-testing

Conversation

@buzz-code

@buzz-code buzz-code commented Apr 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Wires the project into the new shared testing infrastructure and adds comprehensive entity config test coverage.

Solid testing infrastructure

  • Add server/helpers/endpoints.env — lists all entity endpoints for e2e smoke testing
  • Remove old per-project scripts/test_all_endpoints.sh (superseded by shared runner)
  • Bump client/shared → includes createResourceTests + entities.test.js
  • Bump server/shared → includes entity-config-tester + shared e2e scripts

Entity config specs (new)

All previously untested entity configs in server/src/entity-modules/__tests__/:

  • excellency-date.config.spec.ts
  • grade.config.spec.ts
  • report-period.config.spec.ts
  • specialty-absence.config.spec.ts
  • specialty.config.spec.ts
  • student-specialty.config.spec.ts
  • student-type.config.spec.ts
  • student.config.spec.ts
  • test-name.config.spec.ts

Each spec validates entity class identity, query.join, export headers (first field + count), and export join mutations where applicable.\n\n---\n\n> ⚠️ Merge order dependency\n> This PR depends on:\n> - nra-server #6 — must be merged first\n> - nra-client #6 — must be merged first\n>\n> After those are merged, bump the submodule refs in this repo to the new main HEAD before merging this PR.

Copilot AI review requested due to automatic review settings April 26, 2026 18:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR wires the repo into a shared testing infrastructure and adds/extends Jest specs that validate server entity-module configs (entity identity, joins, and export headers), plus introduces a centralized endpoint list for shared e2e smoke tests.

Changes:

  • Add concise createEntityConfigTests(...) specs for multiple server entity-module configs.
  • Replace the repo-local “test all endpoints” shell script with an endpoints.env file intended for the shared e2e runner.
  • Remove the legacy server/helpers/test-all-endpoints.sh script.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
server/src/entity-modules/tests/transportation.config.spec.ts Adds config contract test for Transportation export headers.
server/src/entity-modules/tests/teacher-salary-report.config.spec.ts Adds config contract test covering joins/export joins and export headers.
server/src/entity-modules/tests/teacher-grade-report-status.config.spec.ts Adds export header contract test for the view-entity config.
server/src/entity-modules/tests/student-klass-report.config.spec.ts Adds join/export-join and export header contract test for StudentKlassReport.
server/src/entity-modules/tests/report-group.config.spec.ts Adds join/export-join and export header contract test for ReportGroup.
server/src/entity-modules/tests/report-group-session.config.spec.ts Adds join contract test for ReportGroupSession.
server/src/entity-modules/tests/lesson.config.spec.ts Adds join/export-join and export header contract test for Lesson.
server/src/entity-modules/tests/known-absence.config.spec.ts Adds join/export-join and export header contract test for KnownAbsence.
server/src/entity-modules/tests/absenceType.config.spec.ts Adds export header contract test for AbsenceType.
server/helpers/test-all-endpoints.sh Removes legacy per-repo endpoint smoke-test script.
server/helpers/endpoints.env Adds centralized endpoint list for shared e2e smoke testing.

Comment thread server/helpers/endpoints.env Outdated
@@ -0,0 +1 @@
ENDPOINTS="user att_report att_report_with_report_month grade klass klass_type known_absence lesson student_klass student teacher text student_klass_report student_base_klass student_speciality audit_log import_file report_group report_group_session yemot_call mail_address recieved_mail page report_month teacher_report_status teacher_grade_report_status text_by_user student_percent_report att_report_and_grade student_global_report image student_by_year payment_track teacher_salary_report known_absence_with_report_month grade_name attendance_name att_grade_effect grade_effect_by_user abs_count_effect_by_user lesson_klass_name"

Copilot AI Apr 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endpoints.env is missing some endpoints that are registered in EntitiesModule and/or referenced in registerEntityNameMap, so the e2e smoke test list will be incomplete. In particular, transportation (Transportation), absence_type (AbsenceType), and uploaded_file (UploadedFile) appear to be omitted—please add the missing endpoints so all registered entity modules are covered.

Suggested change
ENDPOINTS="user att_report att_report_with_report_month grade klass klass_type known_absence lesson student_klass student teacher text student_klass_report student_base_klass student_speciality audit_log import_file report_group report_group_session yemot_call mail_address recieved_mail page report_month teacher_report_status teacher_grade_report_status text_by_user student_percent_report att_report_and_grade student_global_report image student_by_year payment_track teacher_salary_report known_absence_with_report_month grade_name attendance_name att_grade_effect grade_effect_by_user abs_count_effect_by_user lesson_klass_name"
ENDPOINTS="user att_report att_report_with_report_month grade klass klass_type known_absence lesson student_klass student teacher text student_klass_report student_base_klass student_speciality audit_log import_file report_group report_group_session yemot_call mail_address recieved_mail page report_month teacher_report_status teacher_grade_report_status text_by_user student_percent_report att_report_and_grade student_global_report image student_by_year payment_track teacher_salary_report known_absence_with_report_month grade_name attendance_name att_grade_effect grade_effect_by_user abs_count_effect_by_user lesson_klass_name transportation absence_type uploaded_file"

Copilot uses AI. Check for mistakes.
- server/shared (nra-server): 2f339e0 — after feature/solid-testing merge
- client/shared (nra-client): 9276a7e — after feature/solid-testing merge
Add transportation, absence_type, uploaded_file which are registered in
EntitiesModule but were missing from the ENDPOINTS list.
AppService.getHello() now returns 'Hello World! Server started at <ISO>'.
Update the e2e assertion to use a regex pattern, matching the existing
unit test assertions in app.service.spec.ts and app.controller.spec.ts.
@buzz-code
buzz-code merged commit e364415 into main Apr 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants