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.
Student numbers are 90000SSPP: SS the spec index listed below, PP the person within that
spec, the leading 9 keeping them clear of real UH numbers. Digits only, 6–12 of them, per
verified_student_numbers.student_number_format.
Account linking and worker ticks are both global — one spec’s tick advances every eligible row in
the shared database — so two specs sharing a student number would see each other’s registration
attempts. Each spec under system-tests/src/tests/credit-registration/ owns one SS, and the
mock Suotar’s persons must reuse the same numbers: 02 suotar-account-linking,
03 suotar-enrolment-problems, 04 suotar-import-outcomes, 05 suotar-verify-outcomes,
06 suotar-sisu-outage, 08 suotar-teacher-views, 09 suotar-admin-dashboard,
10 suotar-old-flow-coexistence, 11 suotar-backfill, 12 suotar-grade-improvement,
13 suotar-student-emails, 14 suotar-fast-track-linking, 15 suotar-in-course-banner,
16 suotar-student-profile. 01 belongs to no single spec: it holds the linked and unlinked
students that read-only specs share. 07 is unused.
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 realisation for one module looks like. The defaults are the working shape; the import-outcomes modules each break exactly one of them.
- Mock
Person Fixture - A seeded student and the Sisu person the mock must answer with for them. The database rows and the pushed persons must carry the same identifiers, so both are built from here.
Constants§
- ADMIN_
COURSE_ ID - Owned exclusively by
suotar-admin-dashboard.spec.ts: discovery and the linking mails tick by course, so the spec that ticks them needs a course no other spec has students on. - ADMIN_
COURSE_ SLUG - ADMIN_
LINKED - 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.
- ADMIN_
UNLINKED - BACKFILL_
COURSE_ ID - Owned outright by
suotar-backfill.spec.ts, which flips the Suotar flag on. - BACKFILL_
COURSE_ SLUG - BACKFILL_
STUDENTS - BANNER_
REENROLS - Its own person, because its spec creates the enrolment that makes the banner go away and that must not clear another spec’s banner.
- BANNER_
STUCK - Absent from the mock’s enrolments, like
NO_ENROLMENT, so its row parks where the in-course re-enrol banner shows. Its spec only reads and dismisses, so the row stays parked. - CRS_101
- CRS_102
- CRS_
ADMIN_ 101 - CRS_
BACKFILL_ 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 - CRS_
STATES_ 101 - EMAILS_
NO_ ENROLMENT - Deliberately absent from the mock’s enrolments, like
NO_ENROLMENT, so its row parks atno_usable_enrolmentand earns the action-needed mail without arming a fault. - EMAILS_
REGISTERED - Driven all the way to
registered, which is what earns the “your credits are in Sisu” mail. - FAST_
TRACK_ HAS_ NUMBER - Its account already holds
FAST_TRACK_OTHER_NUMBER, so swapping it belongs behind the mailed link’s confirmation screen, which names both numbers. - FAST_
TRACK_ NAME_ MISMATCH - The recycled-address signal: the address is proved, but the account belongs to somebody else.
seed_fast_track_near_missesgives its account a name unlike the registry’s. - FAST_
TRACK_ NO_ MATCH - A confirmed account whose address the registry simply does not hold. The population the linking mail exists for, and the regression that matters most: it must still be mailed.
- FAST_
TRACK_ OTHER_ NUMBER - Not on any roster: only the account’s existing link needs it to exist.
- FAST_
TRACK_ SECONDARY_ ONLY mock_suotar_worldmoves its account address to the registry’s secondary field, which is self-entered there and therefore never proof.- FAST_
TRACK_ STALE - Verified far outside the recency window: a deprovisioned university address can be reissued, and the account holding it would still look verified.
- FAST_
TRACK_ TWIN - FAST_
TRACK_ VERIFIED - Its Sisu address equals the account address, which is what the fast track fires on; the twin below differs only in the account’s verification flag.
- GRADE_
IMPROVEMENT - GRADE_
IMPROVEMENT_ COURSE_ ID - Owned by
suotar-grade-improvement.spec.ts, and the only graded module here. - GRADE_
IMPROVEMENT_ COURSE_ SLUG - IMPORT_
OUTCOMES - 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 - IMPORT_
TIMEOUT - The import that times out. Its own person, so the fault keyed on this student number cannot reach another spec’s row on the shared course.
- LINKED_
STUDENT - Linked to its student number from seed time:
suotar-student-profile.spec.tsreads its linked card. - 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.
- NO_
ENROLMENT - Deliberately absent from the mock’s enrolments: the only way to reach
no_usable_enrolmentwithout arming a fault. - OLD_
FLOW_ COURSE_ ID - A course left on the legacy open-university pull flow, for the coexistence specs.
- OLD_
FLOW_ COURSE_ SLUG - PROFILE_
EMPTY_ EMAIL - Enrolled on a Suotar course and nothing else, for the profile tab’s empty state.
- RETRY_
COURSE_ ID - Owned by
suotar-teacher-views.spec.ts’s retry half, and swept by its bulk retry. - RETRY_
COURSE_ SLUG - SISU_
OUTAGE - The outage spec’s own person, so a fault keyed on this student number cannot reach another
spec’s row on the shared course. Enrolment left unseeded for
IMPORT_TIMEOUT’s reason: its spec arms the outage before creating the enrolment, so no earlier unscoped sweep can import the row while the study registry is still answering normally. - STATES_
COURSE_ ID - One frozen ledger row per registration state and per error code, on a paused module. Read by
suotar-teacher-views.spec.tsand the admin explorer, written by neither. - STATES_
COURSE_ SLUG - SUOTAR_
COURSE_ ID - The course the Suotar specs live on.
- SUOTAR_
COURSE_ SLUG - SUPERSEDED
- 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. - TWO_
ENROLMENTS - Enrolled on one course twice, through a degree programme and through the open university, so the selection policy has something to choose between.
- UNLINKED_
STUDENT - The twin with no student number linked, enrolled and nothing more.
- VERIFY_
MISREGISTERED - VERIFY_
POLLING
Functions§
- enrolment 🔒
- mock_
suotar_ world - The world the mock Suotar serves, built from the same fixtures the database rows above are.
- person 🔒
- product_
id - product_
token 🔒