Expand description
The fixture identities the credit-registration (Suotar) system tests are built from.
The seed writes the database rows and the mock study registry serves the matching registry rows, so neither side owns these: both read them here.
Every seeded account holds one student number for good, so a number is shared by every spec that
drives that account. Isolation is per (student number, course code) instead: the mock and the
workers are global, so no two specs may drive the same account on the same course.
LANE_COMPLETIONS and the table in system-tests/src/utils/creditRegistration.ts allocate
them. Numbers are digits only, 6โ12 of them, per verified_student_numbers.student_number_format,
the leading 9 keeping them clear of real UH numbers.
Names and emails are unlikely strings (Zzyzx โฆ) because a spec asserts their absence from the
scrubbed Suotar API log.
Structsยง
- Course
Unit ๐Shape - What the mockโs course unit for one module looks like. The defaults are the working shape; the import-outcomes modules each break exactly one of them.
- Lane
Completion - A seeded completion on one of the two general Suotar courses, and the enrolments the registry
holds for it. Without one the row parks at
no_usable_enrolment, or waits for its spec to create the enrolment after arming a fault, so no earlier unscoped sweep can import the row first. - Mock
Person Fixture - A Sisu person, and the seeded account it belongs to if any. The database rows and the pushed persons must carry the same identifiers, so both are built from here.
Constantsยง
- ADMIN_
COURSE_ ID - Owned by
suotar-admin-dashboard.spec.ts: discovery and the linking mails tick by course, so the spec that ticks them needs a roster no other specโs unlinked people are on. - ADMIN_
COURSE_ SLUG - ADMIN_
STALE - Mailed to the cap, never claimed, no account: the stale-address population is the only place the resend and manual-link actions render.
- CREDIT_
REGISTRATION_ STUDENT_ 1 - Created and linked to this number by the credit-registration seed, like the four below.
- CREDIT_
REGISTRATION_ STUDENT_ 2 - Linked by support by hand rather than by the mailed link, which the teacher view renders differently.
- CREDIT_
REGISTRATION_ STUDENT_ 3 - CREDIT_
REGISTRATION_ STUDENT_ 4 - CREDIT_
REGISTRATION_ STUDENT_ 5 - CREDIT_
REGISTRATION_ STUDENT_ 6 - CRS_101
- CRS_
ADMIN_ 101 - CRS_
B_ 101 - CRS_
GRADED_ 101 - CRS_
IMPORT_ 101 - One module per import failure, each breaking exactly one thing.
- CRS_
IMPORT_ 102 - CRS_
IMPORT_ 103 - CRS_
IMPORT_ 104 - CRS_
OLD_ 101 - CRS_
OLD_ 102 - The module
suotar-old-flow-coexistence.spec.tstreats as already cut over: Suotar-enabled, but holding a completion the legacy pull path registered before the cutover happened. - CRS_
RETRY_ 101 - DEGREE ๐
- GRADE_
IMPROVEMENT_ COURSE_ ID - Owned by
suotar-grade-improvement.spec.ts, and the only graded module here. - GRADE_
IMPROVEMENT_ COURSE_ SLUG - IMPORT_
OUTCOMES_ COURSE_ ID - Owned by
suotar-import-outcomes.spec.ts; its modules are the failing shapes. - IMPORT_
OUTCOMES_ COURSE_ SLUG - IMPORT_
OUTCOME_ COURSE_ CODES - LANE_
COMPLETIONS - LINK_
CLAIMER_ EMAIL - Claims the seeded linking tokens, and holds no student number of its own: the tokens are unbound and bind to whoever opens the link.
- LINK_
EXPIRED - LINK_
USED - LINK_
VALID - MAILED_
ADDRESS_ SUFFIXES - Three distinct addresses out of one Sisu address: the dedup key is the address and the cap is three mails per person and course.
- NOT_
ENROLLED ๐ - OLD_
FLOW_ COURSE_ ID - A course left on the legacy open-university pull flow, for the coexistence specs.
- OLD_
FLOW_ COURSE_ SLUG - RETRY_
COURSE_ ID - Owned by
suotar-teacher-views.spec.tsโs retry half, and swept by its bulk retry. - RETRY_
COURSE_ SLUG - STATES_
COURSE_ CODES - One module per column of the frozen-row grid: an account holds one completion per module.
- STATES_
COURSE_ ID - One frozen ledger row per registration state and per error code, on paused modules. Read by
suotar-teacher-views.spec.tsand the admin explorer, written by neither. - STATES_
COURSE_ SLUG - STUDENT_
6 - A general seeded student the credit-registration seed links to this number, like
student7andstudent8. Kept off every row that asks something of the student:suotar-student-profile.spec.tsasserts its studies page is clean. - STUDENT_
7 - STUDENT_
8 - SUOTAR_
B_ COURSE_ ID - A second general Suotar course, so one account can serve a spec on each.
- SUOTAR_
B_ COURSE_ SLUG - SUOTAR_
COURSE_ ID - The general Suotar course, and the only one with a chapter page to read.
- SUOTAR_
COURSE_ SLUG - TEACHER_
RESEND_ CAPPED - A second capped person on
ADMIN_STALEโs course, owned by the teacher specs so a cap-refused resend cannot race whichever spec is overriding the cap.
Functionsยง
- enrolment ๐
- mock_
suotar_ world - The world the mock Suotar serves, built from the same fixtures the database rows are.
- person ๐