Export parity (React / Vite vs LMS)¶
LessonKit 1.7.x extends the 0.9.x conformance harness with Vitest CLI integration tests and Playwright launch coverage for SCORM 2004, xAPI, and cmi5. Last verified against release 1.7.4.
Surfaces¶
Surface |
What it is |
How we test |
|---|---|---|
Vite preview |
|
Playwright golden-vite project on |
Telemetry harness |
Minimal React app for batch/xAPI behavior |
Playwright telemetry-harness project on |
Standalone |
LXPack |
Static server + Playwright |
SCORM 1.2 |
ZIP for LMS upload |
Unzip + launch HTML with injected SCORM 1.2 |
SCORM 2004 |
ZIP for LMS upload |
Unzip + launch SCO with injected |
xAPI / cmi5 |
ZIP for LRS / cmi5 hosts |
Unzip + static server on package |
Conformance matrix¶
Surface |
Playwright / script |
Guarantee |
|---|---|---|
Vite (golden) |
|
Quiz and knowledge check reachable by keyboard; lesson nav activatable |
Vite (golden) |
|
Session id persisted; quiz completion feedback |
Vite (golden) |
|
Sign-off assessments complete |
Vite (harness) |
|
|
Vite (harness) |
|
Failed transport queues statements; flush delivers after mode ok |
Standalone |
|
Native assessment shell completes |
SCORM 1.2 |
|
LMS API mock receives status/score updates |
SCORM 2004 |
|
|
xAPI |
|
Packaged shell completes native assessments |
cmi5 |
|
Packaged shell completes native assessments |
CLI pipeline |
|
Real |
Manifest ↔ React IDs |
|
|
Package-time ID guard |
|
|
All LMS packages |
|
|
Golden artifacts |
|
|
What is guaranteed (1.7.x)¶
For the reference course (examples/lxpack-golden):
Sign-off step loads in the SPA on Vite, standalone, and SCORM 1.2 surfaces.
Quiz
safety-checkaccepts the correct answer and shows success feedback.Knowledge check
ppe-acknowledgmentaccepts the confirm choice.SCORM 1.2: LMS API mock receives status/score
SetValuecalls after interaction (seee2e/support/scorm/).SCORM 2004:
API_1484_11mock receives completion or score updates after interaction.xAPI / cmi5: Packaged launch HTML loads and sign-off assessments complete (same shell model as standalone).
For the telemetry harness (e2e/fixtures/telemetry-harness):
Telemetry batching delivers multiple events in one
batchSinkcall when flushed.xAPI statements queue when transport fails and flush after transport succeeds.
What is not guaranteed yet¶
Bit-identical DOM or CSS across surfaces (themes should match via interchange
runtime, but layout is shell-specific).Multi-lesson
per-lesson-spaCLI packaging (use@lessonkit/lxpackdirectly).
SCORM 1.2 artifact layout¶
After lessonkit package --target scorm12:
.lxpack/course/.lxpack/out/course-scorm12.zip
imsmanifest.xml # first <resource href="..."> is the launch file
<launch>.html # LXPack shell; hosts SPA in <iframe>
dist/ # Vite build (single-spa)
...
E2E resolves the launch file from imsmanifest.xml, injects window.API, then drives assessments in the LXPack shell.
Run locally¶
npm ci
npm exec -w @lessonkit/e2e -- playwright install --with-deps chromium
npm run test:integration
npm run test:e2e
npm run conformance:lxpack
npm run conformance:golden
See e2e/README for the test catalog, artifact layout, and debugging.
CI job map¶
GitHub Actions job |
Node |
Commands (equivalent) |
|---|---|---|
Checks (matrix) |
18, 20 |
|
Docs (Sphinx) |
20 |
|
Integration |
20 |
|
Packaging smoke |
20 |
golden |
E2E (Playwright) |
20 |
|
Security (npm audit) |
20 |
|
Workflow: .github/workflows/checks.yml