fix(editor): overview rows ask first, no empty save, board 31 icons
U2 Task 6 review by self: - The overview stays shown during a selection (A3): its rows and view rows now go through the drawing guard, so a started move or redraw asks before a click there drops it (R-12). Was a regression: the column was unreachable while selected before Task 6. - The edit form compares and merges trimmed names and colour: a space typed alone is no change and writes no `update`. - A layer opened with no opener (reload, Forward) returns the focus to its row on close. - Board 31 A: icons on « Modifier », « Modifier la forme » (the shape's glyph), « Marquer comme relu »; « Supprimer » as red text with its trash icon. - Tests: overview row and view row ask during a started move; a row asks during a started redraw; whitespace-only save; unnamed link read rows; focus back to the row with no opener. Dead helpers removed (tests/helpers openProperties, e2e propertiesDialog). Mapping: the point-edit « Enter on the selected row … asks first » test (which replaced « Toutes les annotations asks first ») keeps its place; the overview-row path it did not cover now has its own test.
This commit is contained in:
1 parent
cd794f3c39
commit
ebcf2723a0
10 files changed
+145
-25
No files matched your search
@@ -505,6 +505,26 @@ describe('review fixes: no silent loss, no empty commit, no lost focus', () => {
|
||||
expect(screen.queryByTestId('annotation-creation')).toBeNull()
|
||||
})
|
||||
|
||||
it('another row or a view row of the overview asks first (A3: the column stays shown)', async () => {
|
||||
await started()
|
||||
const list = screen.getByRole('list', { name: 'Annotations de la vue' })
|
||||
const rows = within(list).getAllByRole('button')
|
||||
const other = rows.find(
|
||||
(row) => row.getAttribute('aria-current') !== 'true',
|
||||
)!
|
||||
fireEvent.click(other)
|
||||
expect(question()).toBe('move')
|
||||
expect(useAnnotationWork.getState().mode?.started).toBe(true)
|
||||
expect(within(list).getByRole('button', { current: true })).not.toBe(other)
|
||||
act(() => useAnnotationWork.setState({ question: null }))
|
||||
const views = screen
|
||||
.getByRole('heading', { name: 'Vues' })
|
||||
.closest('section')!
|
||||
fireEvent.click(within(views).getAllByRole('button')[0]!)
|
||||
expect(question()).toBe('move')
|
||||
expect(screen.getByTestId('move-mode-bar')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('an unstarted mode ends at once on a tool change', async () => {
|
||||
await mount(two())
|
||||
await select()
|
||||
|
||||
Reference in new issue
Block a user