fix(editor): dialog trigger for references, Task 11 review minors

This commit is contained in:
bchanot committed 2026-11-15 16:25:32 +01:00
1 parent da755f9768
commit d9dbcf1609
11 files changed
+47 -59

No files matched your search

+3 -6
View File
@@ -731,17 +731,14 @@ describe('Constats tab', () => {
await user.click(items()[2])
const trigger = () =>
inFindingDialog().getByRole('button', { name: /^1 référence$/ })
expect(trigger()).toHaveAttribute('aria-expanded', 'false')
expect(trigger()).toHaveAttribute('aria-controls', 'editor-citations-panel')
expect(trigger()).toHaveAttribute('aria-haspopup', 'dialog')
expect(trigger()).not.toHaveAttribute('aria-expanded')
await user.click(trigger())
expect(trigger()).toHaveAttribute('aria-expanded', 'true')
const citations = screen
.getByTestId('editor-citations-panel')
.closest('dialog')!
await user.click(within(citations).getByRole('button', { name: 'Fermer' }))
await waitFor(() =>
expect(trigger()).toHaveAttribute('aria-expanded', 'false'),
)
await waitFor(() => expect(trigger()).toHaveFocus())
})
it('a category has no vet flag; read-only hides the editing actions', async () => {