fix(editor): Task 7 round 1, reveal reset, forced-colors ring
This commit is contained in:
1 parent
085c56877c
commit
4018344ffc
5 files changed
+37
-5
No files matched your search
@@ -195,6 +195,35 @@ describe('deleting (owner item 3)', () => {
|
||||
await waitFor(() => expect(row).toHaveFocus())
|
||||
})
|
||||
|
||||
it('a later step that brings no finding back refocuses nothing', async () => {
|
||||
const user = await mount()
|
||||
const zone = { kind: 'zone', id: 'zone-a' }
|
||||
const element = {
|
||||
kind: 'zone',
|
||||
value: {
|
||||
id: 'zone-a',
|
||||
name: name('Zone B'),
|
||||
categories: doc().finding_zones[0].categories,
|
||||
},
|
||||
}
|
||||
act(() => {
|
||||
store.getState().commit({ op: 'update', key: zone, element } as never)
|
||||
})
|
||||
await openFinding(user, /Node A/)
|
||||
await deleteOpen(user)
|
||||
const undo = () =>
|
||||
user.click(screen.getByRole('button', { name: /^Défaire/ }))
|
||||
await undo()
|
||||
const row = await screen.findByRole('treeitem', { name: /Node A/ })
|
||||
await waitFor(() => expect(row).toHaveFocus())
|
||||
expect(store.getState().revealed).toBeNull()
|
||||
act(() => row.blur())
|
||||
await undo()
|
||||
await screen.findByRole('treeitem', { name: /Zone A/ })
|
||||
expect(store.getState().revealed).toBeNull()
|
||||
expect(row).not.toHaveFocus()
|
||||
})
|
||||
|
||||
it('« Refaire » of a creation shows its row the same way', async () => {
|
||||
const user = await mount()
|
||||
await openFinding(user, /Node A/)
|
||||
|
||||
Reference in new issue
Block a user