test(editor): V1-2.6 browser journeys on the sandbox, touch drag and findings fixes
This commit is contained in:
1 parent
7bbd096a16
commit
5097fd7484
18 files changed
+3010
-8
No files matched your search
@@ -96,6 +96,30 @@ describe('findings tree model', () => {
|
||||
expect(shown.map((i) => i.kind)).toEqual(['zone', 'category', 'zone'])
|
||||
})
|
||||
|
||||
it('reads nodes that omit their defaulted fields (the equine import)', () => {
|
||||
const bare = {
|
||||
id: 'n1',
|
||||
name: name('N1'),
|
||||
children: [{ id: 'n2', name: name('N2') }],
|
||||
}
|
||||
const stored = {
|
||||
finding_zones: [
|
||||
{
|
||||
id: 'z',
|
||||
name: name('Z'),
|
||||
categories: [
|
||||
{ id: 'c', kind: 'dysfunction', name: name('C'), children: [bare] },
|
||||
],
|
||||
},
|
||||
],
|
||||
} as unknown as AnatomicalSheetDocument
|
||||
const all = buildItems(stored)
|
||||
expect(all.map((i) => i.level)).toEqual([1, 2, 3, 4])
|
||||
expect(all[3].element).toMatchObject({
|
||||
value: { reference_ids: [], children: [], review_status: 'inherited' },
|
||||
})
|
||||
})
|
||||
|
||||
it('maps the WAI-ARIA keys', async () => {
|
||||
await openReady({ text: treeText() })
|
||||
const all = buildItems(doc())
|
||||
|
||||
Reference in new issue
Block a user