fix(editor): plurals, trimmed names, default tab, parent drawing confirmation

This commit is contained in:
bchanot committed 2026-11-04 19:40:43 +01:00
1 parent b42c6ae844
commit be4f468790
35 files changed
+385 -63

No files matched your search

@@ -57,9 +57,9 @@ describe('Vérification panel', () => {
it('shows the counts, the warning apart, the size and the groups', async () => {
await openReady()
render(<VerificationTab {...props} />)
expect(screen.getByText('0 erreurs bloquantes')).toBeTruthy()
expect(screen.getByText('1 avertissements')).toBeTruthy()
expect(screen.getByText('1 éléments à confirmer')).toBeTruthy()
expect(screen.getByText('0 erreur bloquante')).toBeTruthy()
expect(screen.getByText('1 avertissement')).toBeTruthy()
expect(screen.getByText('1 élément à confirmer')).toBeTruthy()
expect(screen.getByRole('heading', { name: 'Avertissements' })).toBeTruthy()
expect(
screen.getByText(/lié(e)? à aucune zone|liée à aucune zone/),
@@ -75,7 +75,7 @@ describe('Vérification panel', () => {
await openReady({ text: textWithError() })
const user = userEvent.setup()
render(<VerificationTab {...props} />)
expect(screen.getByText('1 erreurs bloquantes')).toBeTruthy()
expect(screen.getByText('1 erreur bloquante')).toBeTruthy()
expect(screen.getAllByText('Sans tracé')).toHaveLength(2)
expect(screen.getByText(/n'a pas de géométrie/)).toBeTruthy()
await user.click(
@@ -96,7 +96,7 @@ describe('Vérification panel', () => {
}) as HTMLButtonElement
expect(button.disabled).toBe(true)
expect(
screen.getByText('Corrigez les 1 erreurs bloquantes pour soumettre.'),
screen.getByText("Corrigez l'erreur bloquante pour soumettre."),
).toBeTruthy()
})
@@ -104,7 +104,7 @@ describe('Vérification panel', () => {
useLocaleStore.setState({ locale: 'en' })
await openReady({ text: textWithError() })
render(<VerificationTab {...props} />)
expect(screen.getByText('1 blocking errors')).toBeTruthy()
expect(screen.getByText('1 blocking error')).toBeTruthy()
expect(screen.getByText(/This annotation has no geometry/)).toBeTruthy()
expect(screen.getAllByRole('button', { name: 'Go to Bare' })).toHaveLength(
2,
@@ -115,7 +115,7 @@ describe('Vérification panel', () => {
await openReady()
render(<VerificationTab {...props} readOnly />)
expect(screen.queryByRole('button', { name: SUBMIT })).toBeNull()
expect(screen.getByText('0 erreurs bloquantes')).toBeTruthy()
expect(screen.getByText('0 erreur bloquante')).toBeTruthy()
})
})