Expand description
Database rows for the credit-registration (Suotar) system tests. The identities they are built
from, and the matching registry world, are in crate::mock_suotar::fixtures.
The workers tick every phase unscoped every few seconds in the test deployment, so a fixture row nothing may move has to sit on a paused module β that is what the states course is for.
StructsΒ§
- General
Course π - Linked
Students π - The accounts holding a linked number, by the fixture they were built from.
- Seeded
Course π - A course with an instance, for enrolling students after the course itself exists.
- Seeded
Student π - A seeded student, with the deterministic id a spec navigates by.
ConstantsΒ§
- CERTIFICATE_
DETOUR_ COURSE_ ID - The certificate detourβs own course. Not in
mock_suotar::fixtureswith the others: this one never reaches Suotar, so the mock registry knows nothing about it. - CERTIFICATE_
DETOUR_ COURSE_ SLUG - CRS_
DETOUR_ 101 - LINKING_
TOKEN_ ALREADY_ USED - LINKING_
TOKEN_ CONFLICT - Its student number is already live on another account, so claiming it is refused without consuming the token.
- LINKING_
TOKEN_ EXPIRED - LINKING_
TOKEN_ VALID - Linking tokens for
suotar-account-linking.spec.ts, seeded rather than mailed. - PROFILE_
EMPTY_ πEMAIL - Enrolled on the general Suotar course and nothing else, for the studies pageβs empty state.
- PULL_
REGISTRAR_ ID - A study registry registrar whose key a spec can present, so the legacy pull stream is readable from a test. Every other registrarβs key is random by design.
- PULL_
REGISTRAR_ SECRET_ KEY - SUPERSEDED_
ATTEMPT_ 1_ ID - The seeded attempt chain, by fixed id so a spec can open the detail page without searching.
- SUPERSEDED_
ATTEMPT_ 2_ ID
FunctionsΒ§
- account_
email π - credit_
registration_ πconfig - Turns the module on with an enrolment link unique to its course code, without which the config check flags the module, and opts its linked studentsβ completions in.
- default_
module_ πid - enroll π
- Enrols the way a student who has been through the courseβs opening dialogs is: without
user_course_settingsand the AI notice acknowledgement, the course pages open on a dialog. - insert_
registered_ πattempt - insert_
student π - instance_
config π - link_
student_ πnumber - module_
ids_ πby_ course_ code - push_
mock_ πsuotar_ world - Aligns the mock Suotarβs world with the rows just written. Nothing is cleared first: the mock installs under a fresh generation and flips the pointer last.
- seed_
admin_ πactions - One
global_adminand onecourse_teacherrow, so the Audit tab has content without depending on another spec having clicked something. - seed_
admin_ πcourse - The account-linking fixtures, on a course of their own, and one linked student a tick can register.
- seed_
certificate_ πdetour_ course - Owned by
completion-registration-certificate-detour.spec.ts. - seed_
credit_ registration - seed_
eligible_ πcompletion - A completion the pipeline will pick up.
prerequisite_modules_completedis the trap: the builder defaults it to false, and such a completion never leavespending. - seed_
frozen_ πregistration - One completion and one ledger row parked in
state, forstudentoncourse_module_id. - seed_
general_ πcourse - One of the courses
LANE_COMPLETIONSallocates: a single working Suotar module. - seed_
grade_ πimprovement_ course - seed_
import_ πoutcomes_ course - One module per failing import shape, so the spec picks its error by picking a module rather than by flipping something every other spec on the course can see.
- seed_
linked_ πstudents - Creates the credit-registration accounts and links every seeded student to its fixtureβs number.
student6βstudent8already exist: the general user seed creates them. - seed_
linking_ πtokens emailed_tomatches no seeded account on purpose: tokens are unbound, and bind to whoever opens the link while logged in.- seed_
old_ πflow_ course - Owned by
suotar-old-flow-coexistence.spec.ts. - seed_
retry_ πcourse - Rows a teacher may put back on the queue and rows they may not, one per holder so a spec finds each by the holderβs last name.
- seed_
states_ πcourse - Every registration state, and every error code, as a frozen row.
- seed_
superseded_ πattempt_ pair - A registered grade-3 attempt superseded by a grade-4 one, so the admin-detail and profile specs get an attempt chain without driving a regrade first.