mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-2540] Lock node feature (#3138)
* add adf-node-lock directive * add lock-node service + button in context menu * unit tests * docs * unit tests fix * Remove unnecessary imports * PR changes * Remove fit from tests * Update specific node from list on lock/ulock
This commit is contained in:
committed by
Denys Vuika
parent
7b7e39d989
commit
7d1b4bf14a
@@ -39,13 +39,17 @@ describe('DocumentActionsService', () => {
|
||||
let alfrescoApiService = new AlfrescoApiServiceMock(new AppConfigService(null), new StorageService());
|
||||
documentListService = new DocumentListService(null, contentService, alfrescoApiService, null, null);
|
||||
|
||||
service = new DocumentActionsService(null, documentListService, contentService);
|
||||
service = new DocumentActionsService(null, null, documentListService, contentService);
|
||||
});
|
||||
|
||||
it('should register default download action', () => {
|
||||
expect(service.getHandler('download')).not.toBeNull();
|
||||
});
|
||||
|
||||
it('should register lock action', () => {
|
||||
expect(service.getHandler('lock')).toBeDefined();
|
||||
});
|
||||
|
||||
it('should register custom action handler', () => {
|
||||
let handler: ContentActionHandler = function (obj: any) {};
|
||||
service.setHandler('<key>', handler);
|
||||
@@ -71,7 +75,7 @@ describe('DocumentActionsService', () => {
|
||||
let file = new FileNode();
|
||||
expect(service.canExecuteAction(file)).toBeTruthy();
|
||||
|
||||
service = new DocumentActionsService(nodeActionsService);
|
||||
service = new DocumentActionsService(nodeActionsService, null);
|
||||
expect(service.canExecuteAction(file)).toBeFalsy();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user