mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ACS-8210] Agent basic details popup (#9956)
This commit is contained in:
committed by
Aleksander Sklorz
parent
16e851e6b5
commit
8abc6d495d
@@ -67,5 +67,17 @@ describe('AgentsApi', () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
describe('getAgentAvatar', () => {
|
||||
it('should get agent avatar', (done) => {
|
||||
const agentId = 'agentId';
|
||||
agentMock.getAgentAvatar200Response(agentId);
|
||||
|
||||
agentsApi.getAgentAvatar(agentId).then((data) => {
|
||||
assert.deepStrictEqual(data, { avatarImage: 'agentAvatarImageMock' });
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -47,4 +47,10 @@ export class AgentMock extends BaseMock {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getAgentAvatar200Response(agentId: string): void {
|
||||
nock(this.host, { encodedQueryParams: true })
|
||||
.get(`/alfresco/api/-default-/private/hxi/versions/1/agents/${agentId}/avatars/-default-`)
|
||||
.reply(200, { avatarImage: 'agentAvatarImageMock' });
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user