test(tests): add characterisation suite of the current app (step 1)
Seven files, 91 cases, on the real SVGs and catalog: catalog invariants, SVG <-> catalog mapping table, pathology-editor matcher parity, click chain through the DOM, full PDF export/import, schema and persistence, i18n and species. Two golden Report v2 fixtures. No application file changed. Report: docs/development/CHARACTERIZATION_REPORT.md. 271/271 green.
This commit is contained in:
1 parent
b0cce2cd8c
commit
e84cbaf884
12 files changed
+1532
No files matched your search
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
# Test fixtures
|
||||
|
||||
Golden inputs frozen for the characterisation tests (plan Step 1). They describe
|
||||
the Report v2 document as the current application produces it.
|
||||
|
||||
| File | Content |
|
||||
|---|---|
|
||||
| `report-v2.full.json` | One report exercising every zone kind the editor can produce: plain hinge point, bilateral joint with both sides, spine zone with vertebrae, detail-popup zone, catalog findings (with and without vet referral and side), free text, severity, comment, conclusion, recommendations, dated next appointment. `boneId` values are the real `data-anno-id` of `public/species/equine/*.svg`; `zoneId`/`path` values exist in `pathologies.json`. |
|
||||
| `report-v2.minimal.json` | Smallest valid v2 report (no observations). |
|
||||
|
||||
Do not edit these files to make a test pass: they are the behavioural oracle for
|
||||
the Report v2 → v3 adapter and for PDF regression. Add a new fixture instead.
|
||||
Vendored
+89
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"version": 2,
|
||||
"id": "fixture-full-v2",
|
||||
"createdAt": "2026-06-01T09:00:00.000Z",
|
||||
"date": "2026-06-01",
|
||||
"practitioner": {
|
||||
"name": "Dr. Claire Dupont",
|
||||
"cabinet": "Cabinet Équi-Ostéo",
|
||||
"contact": "claire@example.test",
|
||||
"siret": "12345678901234"
|
||||
},
|
||||
"animal": {
|
||||
"speciesId": "equine",
|
||||
"name": "Mistral",
|
||||
"breed": "Selle Français",
|
||||
"age": "9 ans"
|
||||
},
|
||||
"owner": { "name": "Jean Martin" },
|
||||
"observations": [
|
||||
{
|
||||
"id": "obs-1",
|
||||
"zones": [
|
||||
{ "boneId": "point-mpbwyyc9" },
|
||||
{ "boneId": "point-mpbwtst0", "side": "left" },
|
||||
{ "boneId": "point-mpbwtst0", "side": "right" }
|
||||
],
|
||||
"findings": [
|
||||
{
|
||||
"zoneId": "c7-t1",
|
||||
"path": ["c7-t1-dysfunctions", "segmental", "fixation"],
|
||||
"labelFrSnapshot": "Fixation de la charnière",
|
||||
"labelEnSnapshot": "Junction fixation"
|
||||
},
|
||||
{
|
||||
"zoneId": "hip",
|
||||
"path": ["hip-dysfunctions", "articular", "restriction-flexion"],
|
||||
"labelFrSnapshot": "Restriction en flexion",
|
||||
"labelEnSnapshot": "Flexion restriction",
|
||||
"side": "left"
|
||||
}
|
||||
],
|
||||
"freeTextFindings": ["Sensibilité au garrot"],
|
||||
"severity": "modérée",
|
||||
"comment": "Réagit à la palpation du garrot."
|
||||
},
|
||||
{
|
||||
"id": "obs-2",
|
||||
"zones": [
|
||||
{
|
||||
"boneId": "zone-mpbx5hx2",
|
||||
"vertebrae": [
|
||||
{ "region": "C", "index": 3 },
|
||||
{ "region": "C", "index": 4 }
|
||||
]
|
||||
}
|
||||
],
|
||||
"findings": [
|
||||
{
|
||||
"zoneId": "cervical",
|
||||
"path": ["cervical-observations", "stumbling-proprioceptive"],
|
||||
"labelFrSnapshot": "Trébuchements / déficit proprioceptif rapporté",
|
||||
"labelEnSnapshot": "Reported stumbling / proprioceptive deficit",
|
||||
"requiresVetReferral": true
|
||||
}
|
||||
],
|
||||
"freeTextFindings": [],
|
||||
"severity": "sévère",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"id": "obs-3",
|
||||
"zones": [{ "boneId": "point-mpbyo7zq", "detailSourceId": "head" }],
|
||||
"findings": [
|
||||
{
|
||||
"zoneId": "atm",
|
||||
"path": ["atm-observations", "headshaking"],
|
||||
"labelFrSnapshot": "Headshaking (secouement de tête)",
|
||||
"labelEnSnapshot": "Headshaking",
|
||||
"requiresVetReferral": true
|
||||
}
|
||||
],
|
||||
"freeTextFindings": [],
|
||||
"comment": "Vue détail tête."
|
||||
}
|
||||
],
|
||||
"conclusion": "Dysfonction cervico-thoracique avec compensation du bassin.",
|
||||
"recommendations": "Repos 3 jours puis reprise progressive.",
|
||||
"nextAppointment": { "kind": "date", "date": "2026-07-01" }
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 2,
|
||||
"id": "fixture-minimal-v2",
|
||||
"createdAt": "2026-06-01T09:00:00.000Z",
|
||||
"date": "2026-06-01",
|
||||
"practitioner": { "name": "Dr. Dupont" },
|
||||
"animal": { "speciesId": "equine", "name": "Mistral" },
|
||||
"owner": { "name": "Jean Martin" },
|
||||
"observations": [],
|
||||
"conclusion": "",
|
||||
"recommendations": ""
|
||||
}
|
||||
Reference in new issue
Block a user