mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[MNT-24923] legal hold hold capabilities are not verified properly (#10930)
* [MNT-24923] Added possibility to filter capabilities by person id * [MNT-24923] Documentation and unit tests
This commit is contained in:
@@ -35,6 +35,8 @@ describe('FilePlansApi', () => {
|
||||
});
|
||||
|
||||
describe('getFilePlanRoles', () => {
|
||||
const filePlanId = 'filePlanId123';
|
||||
|
||||
let expectedRolePaging: FilePlanRolePaging;
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -101,7 +103,6 @@ describe('FilePlansApi', () => {
|
||||
});
|
||||
|
||||
it('should get file plan roles', (done) => {
|
||||
const filePlanId = 'filePlanId123';
|
||||
filePlansApiMock.get200FilePlanRoles(filePlanId);
|
||||
|
||||
filePlansApi.getFilePlanRoles(filePlanId).then((rolePaging) => {
|
||||
@@ -111,7 +112,6 @@ describe('FilePlansApi', () => {
|
||||
});
|
||||
|
||||
it('should get file plan roles with filtering by capability names', (done) => {
|
||||
const filePlanId = 'filePlanId123';
|
||||
filePlansApiMock.get200FilePlanRolesWithFilteringByCapabilityNames(filePlanId);
|
||||
|
||||
filePlansApi
|
||||
@@ -125,5 +125,36 @@ describe('FilePlansApi', () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should get file plan roles with filtering by person id', (done) => {
|
||||
filePlansApiMock.get200FilePlanRolesWithFilteringByPersonId(filePlanId);
|
||||
|
||||
filePlansApi
|
||||
.getFilePlanRoles(filePlanId, {
|
||||
where: {
|
||||
personId: 'someUser'
|
||||
}
|
||||
})
|
||||
.then((rolePaging) => {
|
||||
expect(rolePaging).toEqual(expectedRolePaging);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should get file plan roles with filtering by capability names', (done) => {
|
||||
filePlansApiMock.get200FilePlanRolesWithFilteringByPersonIdAndCapabilityNames(filePlanId);
|
||||
|
||||
filePlansApi
|
||||
.getFilePlanRoles(filePlanId, {
|
||||
where: {
|
||||
personId: 'someUser',
|
||||
capabilityNames: ['capability1', 'capability2']
|
||||
}
|
||||
})
|
||||
.then((rolePaging) => {
|
||||
expect(rolePaging).toEqual(expectedRolePaging);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user