fix(web): cleanup 25 TS errors preexistentes en main (closes #26) #27

Merged
dmolinari merged 5 commits from fix/ADM-011-web-ts-cleanup into main 2026-04-18 13:55:33 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit b5ec0c25a9 - Show all commits

View File

@@ -80,7 +80,7 @@ describe('SeccionForm — create mode', () => {
await userEvent.type(screen.getByLabelText(/nombre/i), 'Mi Sección') await userEvent.type(screen.getByLabelText(/nombre/i), 'Mi Sección')
await userEvent.click(screen.getByRole('button', { name: /crear sección/i })) await userEvent.click(screen.getByRole('button', { name: /crear sección/i }))
await waitFor(() => await waitFor(() =>
expect(screen.getByText(/seleccioná un tipo/i)).toBeInTheDocument(), expect(screen.getByText(/seleccioná un tipo válido/i)).toBeInTheDocument(),
) )
}) })

View File

@@ -6,11 +6,11 @@ import { updateUserPermisosOverrides } from '../../../features/users/api/updateU
const API_URL = 'http://localhost:5000' const API_URL = 'http://localhost:5000'
const mockResponse = { const mockResponse = {
usuarioId: 42,
rol: 'cajero',
rolPermisos: ['ventas:contado:crear'], rolPermisos: ['ventas:contado:crear'],
grant: ['textos:editar'], overrides: {
deny: [], grant: ['textos:editar'],
deny: [],
},
effective: ['ventas:contado:crear', 'textos:editar'], effective: ['ventas:contado:crear', 'textos:editar'],
} }
@@ -35,7 +35,7 @@ describe('updateUserPermisosOverrides api client', () => {
deny: [], deny: [],
}) })
expect(result.grant).toEqual(['textos:editar']) expect(result.overrides.grant).toEqual(['textos:editar'])
expect(result.effective).toContain('textos:editar') expect(result.effective).toContain('textos:editar')
expect(capturedBody).toMatchObject({ grant: ['textos:editar'], deny: [] }) expect(capturedBody).toMatchObject({ grant: ['textos:editar'], deny: [] })
}) })