fix(editor): Task 12 review minors, delete hint and cite label
This commit is contained in:
1 parent
8c420d4b53
commit
11c2b0c5ee
12 files changed
+113
-47
No files matched your search
@@ -140,6 +140,16 @@ describe('closeCitations', () => {
|
||||
expect(closed).toBe(true)
|
||||
expect(nav.state.finding).toMatchObject({ citations: false })
|
||||
})
|
||||
|
||||
it('a forced close of a draft says it was dropped', async () => {
|
||||
cited()
|
||||
register('citations')
|
||||
act(() => {
|
||||
nav.closeCitations(true)
|
||||
})
|
||||
await act(async () => undefined)
|
||||
expect(nav.live).toContain('dropped')
|
||||
})
|
||||
})
|
||||
|
||||
describe('a creation started over the citations dialog', () => {
|
||||
@@ -158,6 +168,19 @@ describe('a creation started over the citations dialog', () => {
|
||||
expect(nav.state.finding).toMatchObject({ citations: true })
|
||||
})
|
||||
|
||||
it('a creation closed or replaced forgets its citing form', async () => {
|
||||
cited()
|
||||
const cite = vi.fn()
|
||||
act(() => nav.references.start(null, cite))
|
||||
act(() => nav.references.close(true))
|
||||
await act(async () => nav.references.created('ref-x'))
|
||||
expect(cite).not.toHaveBeenCalled()
|
||||
act(() => nav.references.start(null, cite))
|
||||
act(() => nav.references.replace(null))
|
||||
await act(async () => nav.references.created('ref-y'))
|
||||
expect(cite).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('a later creation from the library sets the notice, cites nothing', async () => {
|
||||
cited()
|
||||
const cite = vi.fn()
|
||||
|
||||
Reference in new issue
Block a user