feat(editor): « Aller à » opens the finding dialog, spec races fixed
« Aller à » a finding shows its row and opens its dialog in view mode. E2e helpers wait for the history to settle after a layer or section pop; the layout walk waits out the write budget. Label rows for the nine new keys.
This commit is contained in:
1 parent
4731a3376a
commit
c893dec60b
10 files changed
+89
-3
No files matched your search
@@ -351,13 +351,21 @@ describe.each(MODES)('closing, %s', (_label, reduced) => {
|
||||
expect(within(tabPanel).getAllByRole('listitem')).toHaveLength(3)
|
||||
})
|
||||
|
||||
it('« Aller à » a citer from a panel tile closes it and lands on that finding', async () => {
|
||||
it('« Aller à » a citer from a panel tile closes the sheet and opens that finding in its dialog', async () => {
|
||||
const user = await mount()
|
||||
await openFromFinding(user)
|
||||
await user.click(within(panel()).getByRole('button', { name: /^Barone/ }))
|
||||
const go = within(panel()).getAllByRole('button', { name: /^Aller à / })
|
||||
await user.click(go[0])
|
||||
await closed()
|
||||
await waitFor(() =>
|
||||
expect(
|
||||
inFindingDialog().getByRole('heading', { name: 'Cat A' }),
|
||||
).toBeVisible(),
|
||||
)
|
||||
// Closed, the dialog hands the focus back to the row of that finding.
|
||||
await user.click(inFindingDialog().getByRole('button', { name: 'Fermer' }))
|
||||
await waitFor(() => expect(findingDialog()).toBeNull())
|
||||
await focusIs(() => screen.getByRole('treeitem', { name: /Cat A/ }))
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user