test: replacement coverage for the deleted legacy suites (v3 schema rejections, appointment kinds, i18n keys and placeholders, pickLocaleLabel, region mapping, new report route); importer comment
This commit is contained in:
1 parent
09d8b01a54
commit
06a2e86f3c
5 files changed
+242
-1
No files matched your search
@@ -77,6 +77,27 @@ describe('sheet index', () => {
|
||||
expect(sheet.isSpine('head-trigger')).toBe(false)
|
||||
})
|
||||
|
||||
it('maps spine annotations to their region codes on the main view', () => {
|
||||
const codes = ['C', 'T', 'L', 'S', 'Cd']
|
||||
for (const code of codes) {
|
||||
const a = sheet.spineAnnotation(code, 'main')
|
||||
expect(a, code).toBeDefined()
|
||||
expect(a!.vertebral_region_code).toBe(code)
|
||||
expect(sheet.isSpine(a!.id)).toBe(true)
|
||||
}
|
||||
const spineIds = sheet.sheet.document.annotations
|
||||
.filter((a) => sheet.isSpine(a.id))
|
||||
.map((a) => a.id)
|
||||
expect(spineIds).toHaveLength(5)
|
||||
const carried = sheet.sheet.document.annotations
|
||||
.filter(isObservable)
|
||||
.map((a) => a.vertebral_region_code)
|
||||
.filter((c) => c !== null)
|
||||
expect(sheet.regions().map((r) => r.code).sort()).toEqual(
|
||||
[...carried].sort(),
|
||||
)
|
||||
})
|
||||
|
||||
it('resolves finding paths and reports absent ones', () => {
|
||||
expect(
|
||||
sheet.nodeAt('hip', [
|
||||
|
||||
Reference in new issue
Block a user