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:
bchanot committed 2026-11-13 23:42:32 +01:00
1 parent ce171427c0
commit 6bf9290da7
25 files changed
+1002 -202

No files matched your search

@@ -532,3 +532,30 @@ describe('the finding filter', () => {
expect(chip()).toBeVisible()
})
})
describe('final review: the creation dialog fades out as a creation (M-9)', () => {
it('never shows the edit title while it closes', async () => {
const user = await mount()
await user.click(
screen.getByRole('button', { name: 'Ajouter une référence' }),
)
await waitFor(() => expect(refDialog()).toBeDefined())
await user.selectOptions(field('Type'), 'book')
await user.type(field('Citation'), 'Nouvelle source')
const titles = new Set<string>()
const seen = new MutationObserver(() => {
document
.querySelectorAll('dialog h2')
.forEach((h) => titles.add(h.textContent ?? ''))
})
seen.observe(document.body, {
subtree: true,
childList: true,
characterData: true,
})
await save(user)
await closed()
seen.disconnect()
expect(titles).not.toContain('Modifier la référence')
})
})