feat(editor): one tab order, vertical Plus list with the error count

This commit is contained in:
bchanot committed 2026-11-15 15:52:28 +01:00
1 parent b41c24b29d
commit ff21b0315e
11 files changed
+155 -75

No files matched your search

+4 -4
View File
@@ -155,24 +155,24 @@ describe('tabs', () => {
expect(screen.queryByRole('button', { name: 'Plus' })).toBeNull()
})
it('below 640 px: two tabs and « Plus » listing Général, Constats and Références', async () => {
it('below 640 px: two tabs and « Plus » listing Constats, Références and Vérification', async () => {
const user = userEvent.setup()
mountDraft({ width: 375 })
await ready()
const shown = within(screen.getByRole('tablist')).getAllByRole('tab')
expect(shown.map((tab) => tab.textContent)).toEqual([
'Général',
'Annotations',
'Vérification',
])
await user.click(screen.getByRole('button', { name: 'Plus' }))
const more = document.getElementById('editor-tabs-more') as HTMLElement
const rest = within(more).getAllByRole('button')
expect(rest.map((b) => b.textContent)).toEqual([
'Général',
'Constats',
'Références',
'Vérification',
])
await user.click(rest[1])
await user.click(rest[0])
expect(screen.getByTestId('editor-tab-findings')).toBeInTheDocument()
await waitFor(() =>
expect(document.getElementById('editor-tabs-more')).toBeNull(),