mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
committed by
Eugenio Romano
parent
53d96679ea
commit
e39a2b149b
@@ -151,7 +151,7 @@ describe('ShareDataTableAdapter', () => {
|
||||
});
|
||||
|
||||
it('should generate fallback icon for a file thumbnail with missing mime type', () => {
|
||||
spyOn(documentListService, 'getDefaultMimeTypeIcon').and.returnValue(`assets/images/ft_ic_miscellaneouse.svg`);
|
||||
spyOn(documentListService, 'getDefaultMimeTypeIcon').and.returnValue(`assets/images/ft_ic_miscellaneous.svg`);
|
||||
|
||||
let adapter = new ShareDataTableAdapter(documentListService, null, null);
|
||||
|
||||
@@ -167,7 +167,7 @@ describe('ShareDataTableAdapter', () => {
|
||||
});
|
||||
|
||||
it('should generate fallback icon for a file with no content entry', () => {
|
||||
spyOn(documentListService, 'getDefaultMimeTypeIcon').and.returnValue(`assets/images/ft_ic_miscellaneouse.svg`);
|
||||
spyOn(documentListService, 'getDefaultMimeTypeIcon').and.returnValue(`assets/images/ft_ic_miscellaneous.svg`);
|
||||
|
||||
let adapter = new ShareDataTableAdapter(documentListService, null, null);
|
||||
|
||||
|
@@ -248,9 +248,9 @@ export class ShareDataTableAdapter implements DataTableAdapter {
|
||||
}
|
||||
|
||||
if (merge) {
|
||||
let listPrunedDuplicate = rows.filter((elemntToFilter) => {
|
||||
let isPresent = this.rows.find((currenRow: any) => {
|
||||
return currenRow.obj.entry.id === elemntToFilter.obj.entry.id;
|
||||
let listPrunedDuplicate = rows.filter((elementToFilter) => {
|
||||
let isPresent = this.rows.find((currentRow: any) => {
|
||||
return currentRow.obj.entry.id === elementToFilter.obj.entry.id;
|
||||
});
|
||||
|
||||
return !isPresent;
|
||||
|
@@ -178,7 +178,7 @@ export class CustomResourcesService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all sites in the respository.
|
||||
* Gets all sites in the repository.
|
||||
* @param pagination Specifies how to paginate the results
|
||||
* @returns List of sites
|
||||
*/
|
||||
@@ -266,7 +266,7 @@ export class CustomResourcesService {
|
||||
/**
|
||||
* Is the folder ID a "-my", "-root-", or "-shared-" alias?
|
||||
* @param folderId Folder ID name to check
|
||||
* @returns True if the ID is one of the suppored sources, false otherwise
|
||||
* @returns True if the ID is one of the supported sources, false otherwise
|
||||
*/
|
||||
isSupportedSource(folderId: string): boolean {
|
||||
let isSupportedSources = false;
|
||||
|
@@ -183,10 +183,10 @@ describe('DocumentActionsService', () => {
|
||||
let file = new FileNode();
|
||||
let fileWithPermission: any = file;
|
||||
fileWithPermission.entry.allowableOperations = [permission];
|
||||
const deleteObservale = service.getHandler('delete')(fileWithPermission, null, permission);
|
||||
const deleteObservable = service.getHandler('delete')(fileWithPermission, null, permission);
|
||||
|
||||
expect(documentListService.deleteNode).toHaveBeenCalledWith(file.entry.id);
|
||||
expect(deleteObservale.subscribe).toBeDefined();
|
||||
expect(deleteObservable.subscribe).toBeDefined();
|
||||
});
|
||||
|
||||
it('should support deletion only file node', () => {
|
||||
|
@@ -51,8 +51,8 @@ export class DocumentActionsService {
|
||||
*/
|
||||
getHandler(key: string): ContentActionHandler {
|
||||
if (key) {
|
||||
let lkey = key.toLowerCase();
|
||||
return this.handlers[lkey] || null;
|
||||
let lKey = key.toLowerCase();
|
||||
return this.handlers[lKey] || null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -65,8 +65,8 @@ export class DocumentActionsService {
|
||||
*/
|
||||
setHandler(key: string, handler: ContentActionHandler): boolean {
|
||||
if (key) {
|
||||
let lkey = key.toLowerCase();
|
||||
this.handlers[lkey] = handler;
|
||||
let lKey = key.toLowerCase();
|
||||
this.handlers[lKey] = handler;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@@ -117,10 +117,10 @@ describe('FolderActionsService', () => {
|
||||
let folder = new FolderNode();
|
||||
let folderWithPermission: any = folder;
|
||||
folderWithPermission.entry.allowableOperations = [permission];
|
||||
const deleteObservale = service.getHandler('delete')(folderWithPermission, null, permission);
|
||||
const deleteObservable = service.getHandler('delete')(folderWithPermission, null, permission);
|
||||
|
||||
expect(documentListService.deleteNode).toHaveBeenCalledWith(folder.entry.id);
|
||||
expect(deleteObservale.subscribe).toBeDefined();
|
||||
expect(deleteObservable.subscribe).toBeDefined();
|
||||
});
|
||||
|
||||
it('should not delete the folder node if there is no delete permission', (done) => {
|
||||
|
@@ -49,8 +49,8 @@ export class FolderActionsService {
|
||||
*/
|
||||
getHandler(key: string): ContentActionHandler {
|
||||
if (key) {
|
||||
let lkey = key.toLowerCase();
|
||||
return this.handlers[lkey] || null;
|
||||
let lKey = key.toLowerCase();
|
||||
return this.handlers[lKey] || null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -63,8 +63,8 @@ export class FolderActionsService {
|
||||
*/
|
||||
setHandler(key: string, handler: ContentActionHandler): boolean {
|
||||
if (key) {
|
||||
let lkey = key.toLowerCase();
|
||||
this.handlers[lkey] = handler;
|
||||
let lKey = key.toLowerCase();
|
||||
this.handlers[lKey] = handler;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user