fix(web): cleanup 25 TS errors preexistentes en main (closes #26) #27
@@ -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(),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -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'],
|
||||||
|
overrides: {
|
||||||
grant: ['textos:editar'],
|
grant: ['textos:editar'],
|
||||||
deny: [],
|
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: [] })
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user