feat: typesafe query and more UI changes

This commit is contained in:
Rafael Taranto 2025-05-22 11:47:50 +01:00
parent d73bb88f1d
commit 64e358f61c
13 changed files with 1347 additions and 109 deletions

View file

@ -293,4 +293,31 @@ describe('getAuthorizedStatus', () => {
type: 'error',
})
})
it('should return rejected status for blocked custom info request', () => {
const customer = {
authorizedOverride: null,
isSuspended: false,
customInfoRequests: [
{
infoRequestId: '550e8400-e29b-41d4-a716-446655440000',
override: 'blocked',
},
],
}
const triggers = {
automation: 'manual',
overrides: [],
}
const customRequests = [{ id: '550e8400-e29b-41d4-a716-446655440000' }]
const result = getAuthorizedStatus(customer, triggers, customRequests)
expect(result).toEqual({
label: 'Rejected',
type: 'error',
})
})
})