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.click(screen.getByRole('button', { name: /crear sección/i }))
|
||||
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 mockResponse = {
|
||||
usuarioId: 42,
|
||||
rol: 'cajero',
|
||||
rolPermisos: ['ventas:contado:crear'],
|
||||
grant: ['textos:editar'],
|
||||
deny: [],
|
||||
overrides: {
|
||||
grant: ['textos:editar'],
|
||||
deny: [],
|
||||
},
|
||||
effective: ['ventas:contado:crear', 'textos:editar'],
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('updateUserPermisosOverrides api client', () => {
|
||||
deny: [],
|
||||
})
|
||||
|
||||
expect(result.grant).toEqual(['textos:editar'])
|
||||
expect(result.overrides.grant).toEqual(['textos:editar'])
|
||||
expect(result.effective).toContain('textos:editar')
|
||||
expect(capturedBody).toMatchObject({ grant: ['textos:editar'], deny: [] })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user