fix(editor): final review round, history, dialogs, Plus and limits
I1 scroll restored at once on a Back into layers; I2 Aller a opens the target dialog in one push; M1-M9, criteria 8 and 17 (left-draft notice), entry caps, no exhaustive-deps disables, locals within 5.
This commit is contained in:
1 parent
ce171427c0
commit
6bf9290da7
25 files changed
+1002
-202
No files matched your search
@@ -104,11 +104,11 @@ describe('navigationReducer', () => {
|
||||
expect(state.focus?.target).toEqual(targetOfKey(key))
|
||||
})
|
||||
|
||||
it('go_to a tab closes the finding layers', () => {
|
||||
it('go_to a place that is no finding closes the finding layers', () => {
|
||||
const state = run(
|
||||
initialNavigation('general'),
|
||||
{ type: 'open_citations', citedBy: node },
|
||||
{ type: 'go_to', target: targetOfKey(finding) },
|
||||
{ type: 'go_to', target: targetOfKey(view) },
|
||||
)
|
||||
expect(state.finding).toBeNull()
|
||||
})
|
||||
@@ -306,3 +306,28 @@ describe('navigationReducer', () => {
|
||||
expect(state.visitedSections).toEqual(['drawing', 'categories'])
|
||||
})
|
||||
})
|
||||
|
||||
describe('final review', () => {
|
||||
it('a go_to a finding or a zone opens its dialog in the same move (I-2)', () => {
|
||||
const state = run(
|
||||
initialNavigation('general'),
|
||||
{ type: 'open_citations', citedBy: node },
|
||||
{ type: 'go_to', target: targetOfKey(finding) },
|
||||
)
|
||||
expect(state.finding).toEqual({ key: finding, citations: false })
|
||||
const zone: ElementKey = { kind: 'zone', id: 'z1' }
|
||||
const onZone = run(state, { type: 'go_to', target: targetOfKey(zone) })
|
||||
expect(onZone.finding).toEqual({ key: zone, citations: false })
|
||||
})
|
||||
|
||||
it('close_finding takes the reference dialog over the sheet with it (M-2)', () => {
|
||||
const state = run(
|
||||
initialNavigation('findings'),
|
||||
{ type: 'open_citations', citedBy: node },
|
||||
{ type: 'open_reference', id: 'r1' },
|
||||
{ type: 'close_finding' },
|
||||
)
|
||||
expect(state.finding).toBeNull()
|
||||
expect(state.reference).toBeNull()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user