Skip to main content

Module seed_credit_registration

Module seed_credit_registration 

Source
Expand description

Fixtures for the credit-registration (Suotar) system tests.

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: 01 suotar-happy-path, 02 suotar-account-linking, 03 suotar-enrolment-problems, 04 suotar-import-outcomes, 05 suotar-verify-outcomes, 06 suotar-sisu-outage, 07 suotar-consent, 08 suotar-teacher-views, 09 suotar-admin-dashboard, 10 suotar-old-flow-coexistence, 11 suotar-backfill-and-late-consent, 12 suotar-grade-improvement, 13 suotar-student-emails, 14 suotar-fast-track-linking, 15 suotar-in-course-banner, 16 suotar-student-profile.

Names and emails are unlikely strings (Zzyzx …) because a spec asserts their absence from the scrubbed Suotar API log.

No module here has enable_credit_registration_via_suotar on, and nothing may turn it on: the backfill spec flips it from the UI, which is one-way and run-wide.

Structs§

SeededStudent 🔒
A seeded student, with the deterministic id a spec navigates by.

Constants§

BACKFILL_COURSE_ID
Owned outright by suotar-backfill-and-late-consent.spec.ts, which flips the Suotar flag on.
LINKING_TOKEN_ALREADY_USED
LINKING_TOKEN_EXPIRED
LINKING_TOKEN_VALID
Linking tokens for suotar-account-linking.spec.ts, seeded rather than mailed.
OLD_FLOW_COURSE_ID
A course left on the legacy open-university pull flow, for the coexistence specs.
SUOTAR_COURSE_ID
The course the Suotar specs live on.

Functions§

insert_registered_attempt 🔒
insert_student 🔒
instance_config 🔒
seed_admin_actions 🔒
One global_admin and one course_teacher row, so the Audit tab has content without depending on another spec having clicked something.
seed_backfill_course 🔒
Four passed completions, one already registered by the legacy pull flow so the backfill spec can assert it is skipped rather than re-pushed.
seed_credit_registration
seed_linking_tokens 🔒
emailed_to matches no seeded account on purpose: tokens are unbound, and bind to whoever opens the link while logged in.
seed_superseded_attempt_pair 🔒
A registered grade-3 attempt superseded by a grade-4 one, so the admin-detail and grade-improvement specs get an attempt chain without driving a regrade first.