Skip to Content
Living documentation — last reviewed 2026-05-28
FeaturesClass TypesClass Types — QA Plan

Class Types — QA Plan

Pre-requisites

  • Test org with at least one program (schedule delivery mode).
  • A second org for cross-org isolation.
  • Owner, admin, coach, member personas seeded.

Golden path

G1 — Owner creates a class type

StepActionExpected
1Owner navigates to /dashboard/schedule → class types tab.List loads.
2Click “Add class type”, pick program, name “CrossFit WOD”, color, defaults 60min/20 cap, hasWorkout=true.Form valid.
3Submit.New row appears; response includes embedded program metadata.

G2 — Coach lists class types when creating a session

StepActionExpected
1Coach navigates to “Create session”.Dropdown lists active class types only.
2Pick “CrossFit WOD”; submit with no explicit capacity.Session inherits default_capacity=20.

G3 — Owner deactivates a class type

StepActionExpected
1Owner clicks delete on a class type.API: PATCH? No — DELETE /class-types/:id.
2Re-list.Class type no longer in list.
3Open a historical session that used it.Class type name still renders (relational fetch ignores is_active).

G4 — Update defaults

StepActionExpected
1PATCH /class-types/:id with defaultCapacity:30.Row updated, updated_at bumped.
2New session created with no explicit capacity.Inherits 30 (not 20). Existing sessions unchanged.

G5 — hasWorkout=false (“Open Gym”)

StepActionExpected
1Create class type with hasWorkout=false.Row saved.
2Create a session against it.Workout-attachment controls hidden in UI; class_session_workouts allowed to remain empty; workoutSource='none' in the response.

Edge cases

E1 — Cross-program prevention

StepActionExpected
1Owner of org A POSTs class type with programId belonging to org B.400 ‘Program not found in this organization’.

E2 — Coach attempts mutation

StepActionExpected
1Coach POSTs/PATCHes/DELETEs.403 ‘Only owners and admins can …’.

E3 — Non-member access

StepActionExpected
1User with no membership in org GETs class types.403 from requireMembership.

E4 — Cross-org get-by-id

StepActionExpected
1Owner of org A: GET /organizations/A/class-types/{idFromB}.404 ‘Class type not found’.

E5 — Deactivated class type in active session listing

StepActionExpected
1Deactivate a class type that has 3 published future sessions.Sessions still appear on the schedule. List of class types omits it.

E6 — Reactivation

StepActionExpected
1Re-PATCH the row with isActive:true. Note: UpdateClassTypeDto does not accept isActive; reactivation through PATCH may not work.TODO: verify whether DB-direct reactivation or a dedicated endpoint is the supported path.

Cross-persona

  • Member never sees mutation endpoints; only reads.
  • Coach can read; cannot mutate.

i18n

LangStrings to verify
enschedule.classTypeSheet.hasWorkoutHelper reads “Off for class types like Open Gym that don’t carry programmed workouts — only sessions are generated.”
heSame key present, Hebrew translation.
ruSame key present, Russian translation.

Expected vs actual checks

  • After deactivation, query DB: is_active=false, deleted_at still NULL.
  • After session create with inherited capacity, query session row: capacity matches class type’s default_capacity at the time of creation.
  • After class type rename, existing sessions show the new name (no snapshot on session).