fix(editor): Task 12 review minors, delete hint and cite label

This commit is contained in:
bchanot committed 2026-11-15 16:58:50 +01:00
1 parent 8c420d4b53
commit 11c2b0c5ee
12 files changed
+113 -47

No files matched your search

+8 -4
View File
@@ -630,9 +630,13 @@ describe('Constats tab', () => {
await save()
expect(node().description).toEqual({})
// Neither mode cites: the references dialog holds the citations (Rev 5).
expect(inFindingDialog().queryByLabelText('Citer une référence')).toBeNull()
expect(
inFindingDialog().queryByLabelText('Citer une référence existante'),
).toBeNull()
await startEdit(user)
expect(inFindingDialog().queryByLabelText('Citer une référence')).toBeNull()
expect(
inFindingDialog().queryByLabelText('Citer une référence existante'),
).toBeNull()
act(() => {
store.getState().commit({
op: 'update',
@@ -706,7 +710,7 @@ describe('Constats tab', () => {
expect(all.filter((item) => item.kind === 'node')).toHaveLength(2)
})
it('the trigger reads « expanded » while the references dialog of its finding is open', async () => {
it('the trigger opens the references dialog of its finding, focus back on close', async () => {
let text = insert(treeText(), {
kind: 'reference',
value: { id: 'ref-a', type: 'book', citation: 'A', url: null, doi: null },
@@ -750,7 +754,7 @@ describe('Constats tab', () => {
expect(screen.queryByLabelText('Renvoi vers un vétérinaire')).toBeNull()
expect(screen.getByLabelText('Description (FR)')).toBeInTheDocument()
rerender(<FindingsHost readOnly />)
expect(screen.queryByLabelText('Citer une référence')).toBeNull()
expect(screen.queryByLabelText('Citer une référence existante')).toBeNull()
// the open form is kept, its fields read-only, « Enregistrer » disabled
expect(screen.getByLabelText('Nom (FR)')).toHaveAttribute('readonly')
expect(screen.getByRole('button', { name: 'Enregistrer' })).toBeDisabled()