mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
committed by
Eugenio Romano
parent
53d96679ea
commit
e39a2b149b
@@ -87,7 +87,7 @@ describe('Breadcrumb', () => {
|
||||
expect(component.parseRoute(null)).toEqual([]);
|
||||
});
|
||||
|
||||
it('should not parase the route when node has no path', () => {
|
||||
it('should not parse the route when node has no path', () => {
|
||||
const node: any = {};
|
||||
expect(component.parseRoute(node)).toEqual([]);
|
||||
});
|
||||
|
@@ -82,7 +82,7 @@ describe('DropdownBreadcrumb', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should display only the path in the selectbox', (done) => {
|
||||
it('should display only the path in the selectBox', (done) => {
|
||||
let fakeNodeWithCreatePermissionInstance = JSON.parse(JSON.stringify(fakeNodeWithCreatePermission));
|
||||
fakeNodeWithCreatePermissionInstance.path.elements = [
|
||||
{ id: '1', name: 'Stark Industries' },
|
||||
@@ -169,7 +169,7 @@ describe('DropdownBreadcrumb', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should open the selectbox when clicking on the folder icon', (done) => {
|
||||
it('should open the selectBox when clicking on the folder icon', (done) => {
|
||||
triggerComponentChange(JSON.parse(JSON.stringify(fakeNodeWithCreatePermission)));
|
||||
spyOn(component.dropdown, 'open');
|
||||
|
||||
|
@@ -19,6 +19,6 @@ import { PropertyGroupContainer } from './property-group.interface';
|
||||
import { OrganisedPropertyGroup } from './organised-property-group.interface';
|
||||
|
||||
export interface ContentMetadataConfig {
|
||||
isGroupAllowed(groupname: string): boolean;
|
||||
isGroupAllowed(groupName: string): boolean;
|
||||
reorganiseByConfig(propertyGroups: PropertyGroupContainer): OrganisedPropertyGroup[];
|
||||
}
|
||||
|
@@ -152,7 +152,7 @@ describe('PropertyGroupTranslatorService', () => {
|
||||
expect(logService.error).toHaveBeenCalledWith('Unknown type for mapping: daemonic:scorcher');
|
||||
});
|
||||
|
||||
it('should fall back to singleline property type if unrecognised type is found', () => {
|
||||
it('should fall back to single-line property type if unrecognised type is found', () => {
|
||||
property.name = 'FAS:PLAGUE';
|
||||
property.title = 'The Faro Plague';
|
||||
property.dataType = 'daemonic:scorcher';
|
||||
@@ -170,7 +170,7 @@ describe('PropertyGroupTranslatorService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Different types\'s attributes', () => {
|
||||
describe('Different types attributes', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
propertyGroups.push(propertyGroup);
|
||||
|
@@ -162,7 +162,7 @@ export class ContentNodeDialogService {
|
||||
* Opens a dialog to choose folders to upload.
|
||||
* @param action Name of the action to show in the title
|
||||
* @param contentEntry Item to upload
|
||||
* @returns Information about the chosed folder(s)
|
||||
* @returns Information about the chosen folder(s)
|
||||
*/
|
||||
openUploadFolderDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]> {
|
||||
const select = new Subject<MinimalNodeEntryEntity[]>();
|
||||
|
@@ -328,7 +328,7 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
expect(component.chosenNode).toBeNull();
|
||||
}));
|
||||
|
||||
it('should call the search api on changing the site selectbox\'s value', fakeAsync(() => {
|
||||
it('should call the search api on changing the site selectBox value', fakeAsync(() => {
|
||||
typeToSearchBox('vegeta');
|
||||
|
||||
tick(debounceSearch);
|
||||
@@ -355,7 +355,7 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
expect(cnSearchSpy).toHaveBeenCalledWith('vegeta', '-sites-', 0, 25, ['123456testId', '09876543testId']);
|
||||
}));
|
||||
|
||||
it('should call the content node selector\'s search with the right parameters on changing the site selectbox\'s value from a custom dropdown menu', fakeAsync(() => {
|
||||
it('should call the content node selector\'s search with the right parameters on changing the site selectBox value from a custom dropdown menu', fakeAsync(() => {
|
||||
component.dropdownSiteList = <SitePaging> { list: { entries: [<SiteEntry> { entry: { guid: '-sites-' } }, <SiteEntry> { entry: { guid: 'namek' } }] } };
|
||||
fixture.detectChanges();
|
||||
|
||||
@@ -608,7 +608,7 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('should reload the original documentlist when clearing the search input', fakeAsync(() => {
|
||||
it('should reload the original documentList when clearing the search input', fakeAsync(() => {
|
||||
typeToSearchBox('shenron');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
@@ -216,7 +216,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, PaginatedCompo
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the result list depending on the criterias
|
||||
* Update the result list depending on the criteria
|
||||
*/
|
||||
private updateResults(): void {
|
||||
if (this.searchTerm.length === 0) {
|
||||
@@ -281,7 +281,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, PaginatedCompo
|
||||
this.showingSearchResults = true;
|
||||
this.loadingSearchResults = false;
|
||||
|
||||
// Documentlist hack, since data displaying for preloaded nodes is a little bit messy there
|
||||
// DocumentList hack, since data displaying for preloaded nodes is a little bit messy there
|
||||
if (!this.nodes) {
|
||||
this.nodes = nodePaging;
|
||||
} else {
|
||||
@@ -293,7 +293,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, PaginatedCompo
|
||||
}
|
||||
|
||||
/**
|
||||
* Hightlight the actual searchterm in the next frame
|
||||
* Highlight the actual search term in the next frame
|
||||
*/
|
||||
highlight(): void {
|
||||
setTimeout(() => {
|
||||
|
@@ -82,13 +82,13 @@ describe('ContentNodeSelectorDialogComponent', () => {
|
||||
expect(actionButton.nativeElement.innerText).toBe('NODE_SELECTOR.MOVE');
|
||||
});
|
||||
|
||||
it('should pass through the injected currentFolderId to the documentlist', () => {
|
||||
it('should pass through the injected currentFolderId to the documentList', () => {
|
||||
let documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku');
|
||||
});
|
||||
|
||||
xit('should pass through the injected rowFilter to the documentlist', (done) => {
|
||||
xit('should pass through the injected rowFilter to the documentList', (done) => {
|
||||
fixture.whenStable().then(() => {
|
||||
let documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
@@ -98,7 +98,7 @@ describe('ContentNodeSelectorDialogComponent', () => {
|
||||
|
||||
});
|
||||
|
||||
it('should pass through the injected imageResolver to the documentlist', () => {
|
||||
it('should pass through the injected imageResolver to the documentList', () => {
|
||||
let documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.imageResolver).toBe(data.imageResolver);
|
||||
|
@@ -117,7 +117,7 @@ describe('FolderDialogComponent', () => {
|
||||
expect(dialogRef.close).toHaveBeenCalledWith(folder);
|
||||
});
|
||||
|
||||
it('should emit success output event with folder when submit is succesfull', async(() => {
|
||||
it('should emit success output event with folder when submit is successful', async(() => {
|
||||
const folder = { data: 'folder-data' };
|
||||
let expectedNode = null;
|
||||
|
||||
|
@@ -42,7 +42,7 @@ export class FolderDialogComponent implements OnInit {
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** Emitted when the edit/create folder is successfully created/mmodified
|
||||
/** Emitted when the edit/create folder is successfully created/modified
|
||||
*/
|
||||
@Output()
|
||||
success: EventEmitter<any> = new EventEmitter<MinimalNodeEntryEntity>();
|
||||
|
@@ -117,7 +117,7 @@ describe('NodeLockDialogComponent', () => {
|
||||
expect(alfrescoApi.nodesApi.unlockNode).toHaveBeenCalledWith('node-id');
|
||||
});
|
||||
|
||||
it('should call dialog to close with form data when submit is succesfluly', fakeAsync(() => {
|
||||
it('should call dialog to close with form data when submit is successfully', fakeAsync(() => {
|
||||
const node = { entry: {} };
|
||||
spyOn(alfrescoApi.nodesApi, 'lockNode').and.returnValue(Promise.resolve(node));
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -32,7 +32,7 @@ import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
[adf-create-folder]="parentNode"
|
||||
(success)="success($event)"
|
||||
title="create-title"
|
||||
[nodeType]="'cm:my-litte-pony'">
|
||||
[nodeType]="'cm:my-little-pony'">
|
||||
</div>`
|
||||
})
|
||||
class TestTypeComponent {
|
||||
@@ -154,7 +154,7 @@ describe('FolderCreateDirective', () => {
|
||||
data: {
|
||||
parentNodeId: jasmine.any(String),
|
||||
createTitle: 'create-title',
|
||||
nodeType: 'cm:my-litte-pony'
|
||||
nodeType: 'cm:my-little-pony'
|
||||
},
|
||||
width: jasmine.any(String)
|
||||
});
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "Sie verfügen nicht über die nötige Berechtigung ('{{permission}}'), um {{type}} zu {{action}}"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "Sie sind nicht zum Ändern von Berechtigungen berechtigt."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "You don't have the {{permission}} permission to {{action}} the {{type}}"
|
||||
},
|
||||
"METADATA": {
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "No tiene permiso {{permission}} para {{action}} el {{type}}"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "No puede cambiar los permisos"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "Vous n'avez pas les droits d'accès {{permission}} pour {{action}} le {{type}}"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "Vous n'avez pas le droit de modifier les droits d'accès"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "Non hai l'autorizzazione {{permission}} per {{action}} {{type}}"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "Non è consentito modificare le autorizzazioni"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "{{type}} を {{action}} するための {{permission}} 権限がありません"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "権限を変更することはできません"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "Du har ikke {{permission}} tillatelsen til å {{action}} {{type}}"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "Du har ikke lov til å endre tillatelser"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "U hebt geen {{permission}} rechten voor het {{action}} van {{type}}"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "Het is u niet toegestaan om machtigingen te wijzigen"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "Você não tem a permissão {{permission}} para {{action}} o {{type}}"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "Você não pode alterar permissões"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "У вас нет разрешения {{permission}}, чтобы {{action}} {{type}}"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "У вас нет прав на изменение разрешений"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PERMISSON": {
|
||||
"PERMISSION": {
|
||||
"LACKOF": "您没有 {{action}} {{type}} 的 {{permission}} 权限"
|
||||
},
|
||||
"METADATA": {
|
||||
@@ -288,4 +288,4 @@
|
||||
"NOT-ALLOWED": "不允许更改权限"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* spellchecker: disable */
|
||||
|
||||
export const fakeAuthorityResults: any[] = [{
|
||||
'entry': {
|
||||
'aspectNames': [
|
||||
|
@@ -110,10 +110,10 @@ describe('AddPermissionComponent', () => {
|
||||
|
||||
it('should emit an error event when the node update fail', (done) => {
|
||||
fixture.componentInstance.selectedItems = fakeAuthorityResults;
|
||||
spyOn(nodePermissionService, 'updateNodePermissions').and.returnValue(throwError({ error: 'errored'}));
|
||||
spyOn(nodePermissionService, 'updateNodePermissions').and.returnValue(throwError({ error: 'err'}));
|
||||
|
||||
fixture.componentInstance.error.subscribe((error) => {
|
||||
expect(error.error).toBe('errored');
|
||||
expect(error.error).toBe('err');
|
||||
done();
|
||||
});
|
||||
|
||||
|
@@ -97,7 +97,7 @@ describe('PermissionDisplayComponent', () => {
|
||||
it('should show locally set label for locally set permissions', () => {
|
||||
component.nodeId = 'fake-node-id';
|
||||
spyOn(nodeService, 'getNode').and.returnValue(of(fakeNodeWithOnlyLocally));
|
||||
spyOn(nodePermissionService, 'getGroupMemeberByGroupName').and.returnValue(of(fakeSiteRoles));
|
||||
spyOn(nodePermissionService, 'getGroupMemberByGroupName').and.returnValue(of(fakeSiteRoles));
|
||||
spyOn(searchApiService, 'searchByQueryBody').and.returnValue(of(fakeSiteNodeResponse));
|
||||
fixture.detectChanges();
|
||||
expect(element.querySelector('#adf-permission-display-container')).not.toBeNull();
|
||||
@@ -108,7 +108,7 @@ describe('PermissionDisplayComponent', () => {
|
||||
it('should show a dropdown with the possible roles', async(() => {
|
||||
component.nodeId = 'fake-node-id';
|
||||
spyOn(nodeService, 'getNode').and.returnValue(of(fakeNodeWithOnlyLocally));
|
||||
spyOn(nodePermissionService, 'getGroupMemeberByGroupName').and.returnValue(of(fakeSiteRoles));
|
||||
spyOn(nodePermissionService, 'getGroupMemberByGroupName').and.returnValue(of(fakeSiteRoles));
|
||||
spyOn(searchApiService, 'searchByQueryBody').and.returnValue(of(fakeSiteNodeResponse));
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
|
@@ -60,7 +60,7 @@ describe('NodePermissionService', () => {
|
||||
|
||||
it('should return a list of roles taken from the site groups', async(() => {
|
||||
spyOn(searchApiService, 'searchByQueryBody').and.returnValue(of(fakeSiteNodeResponse));
|
||||
spyOn(service, 'getGroupMemeberByGroupName').and.returnValue(of(fakeSiteRoles));
|
||||
spyOn(service, 'getGroupMemberByGroupName').and.returnValue(of(fakeSiteRoles));
|
||||
|
||||
service.getNodeRoles(fakeNodeWithOnlyLocally).subscribe((roleArray: string[]) => {
|
||||
expect(roleArray).not.toBeNull();
|
||||
@@ -122,7 +122,7 @@ describe('NodePermissionService', () => {
|
||||
spyOn(nodeService, 'getNode').and.returnValue(of(fakeNodeCopy));
|
||||
spyOn(nodeService, 'updateNode').and.callFake((nodeId, permissionBody) => returnUpdatedNode(nodeId, permissionBody));
|
||||
spyOn(searchApiService, 'searchByQueryBody').and.returnValue(of(fakeSiteNodeResponse));
|
||||
spyOn(service, 'getGroupMemeberByGroupName').and.returnValue(of(fakeSiteRoles));
|
||||
spyOn(service, 'getGroupMemberByGroupName').and.returnValue(of(fakeSiteRoles));
|
||||
|
||||
service.updateNodePermissions('fake-node-id', fakeAuthorityResults).subscribe((node: MinimalNodeEntryEntity) => {
|
||||
expect(node).not.toBeNull();
|
||||
|
@@ -157,7 +157,7 @@ export class NodePermissionService {
|
||||
|
||||
private getGroupMembersBySiteName(siteName: string): Observable<string[]> {
|
||||
const groupName = 'GROUP_site_' + siteName;
|
||||
return this.getGroupMemeberByGroupName(groupName)
|
||||
return this.getGroupMemberByGroupName(groupName)
|
||||
.pipe(
|
||||
map((res: GroupsPaging) => {
|
||||
let displayResult: string[] = [];
|
||||
@@ -172,10 +172,10 @@ export class NodePermissionService {
|
||||
/**
|
||||
* Gets all members related to a group name.
|
||||
* @param groupName Name of group to look for members
|
||||
* @param opts Extra options supported by JSAPI
|
||||
* @param opts Extra options supported by JS-API
|
||||
* @returns List of members
|
||||
*/
|
||||
getGroupMemeberByGroupName(groupName: string, opts?: any): Observable<GroupMemberPaging> {
|
||||
getGroupMemberByGroupName(groupName: string, opts?: any): Observable<GroupMemberPaging> {
|
||||
return from<GroupMemberPaging>(this.apiService.groupsApi.getGroupMembers(groupName, opts));
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@ describe('SearchDateRangeComponent', () => {
|
||||
|
||||
const buildAdapter = (): MomentDateAdapter => {
|
||||
const dateAdapter = new MomentDateAdapter();
|
||||
dateAdapter.overrideDisplyaFormat = null;
|
||||
dateAdapter.overrideDisplayFormat = null;
|
||||
return dateAdapter;
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ describe('SearchDateRangeComponent', () => {
|
||||
it('should setup the format of the date from configuration', () => {
|
||||
component.settings = { field: 'cm:created', dateFormat: dateFormatFixture };
|
||||
component.ngOnInit();
|
||||
expect(theDateAdapter.overrideDisplyaFormat).toBe(dateFormatFixture);
|
||||
expect(theDateAdapter.overrideDisplayFormat).toBe(dateFormatFixture);
|
||||
});
|
||||
|
||||
it('should setup form control with formatted valid date on change', () => {
|
||||
|
@@ -80,7 +80,7 @@ export class SearchDateRangeComponent implements SearchWidget, OnInit {
|
||||
this.datePickerDateFormat = this.settings.dateFormat || DEFAULT_FORMAT_DATE;
|
||||
}
|
||||
const theCustomDateAdapter = <MomentDateAdapter> <any> this.dateAdapter;
|
||||
theCustomDateAdapter.overrideDisplyaFormat = this.datePickerDateFormat;
|
||||
theCustomDateAdapter.overrideDisplayFormat = this.datePickerDateFormat;
|
||||
|
||||
this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => {
|
||||
this.setLocale(locale);
|
||||
|
@@ -92,7 +92,7 @@ describe('DropdownSitesComponent', () => {
|
||||
component = fixture.componentInstance;
|
||||
}));
|
||||
|
||||
function openSelectbox() {
|
||||
function openSelectBox() {
|
||||
const selectBox = debug.query(By.css(('[data-automation-id="site-my-files-select"] .mat-select-trigger')));
|
||||
selectBox.triggerEventHandler('click', null);
|
||||
}
|
||||
@@ -137,7 +137,7 @@ describe('DropdownSitesComponent', () => {
|
||||
it('should show the default placeholder label by default', async(() => {
|
||||
fixture.detectChanges();
|
||||
|
||||
openSelectbox();
|
||||
openSelectBox();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
@@ -151,7 +151,7 @@ describe('DropdownSitesComponent', () => {
|
||||
component.placeholder = 'NODE_SELECTOR.SELECT_LOCATION';
|
||||
fixture.detectChanges();
|
||||
|
||||
openSelectbox();
|
||||
openSelectBox();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
@@ -181,7 +181,7 @@ describe('DropdownSitesComponent', () => {
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
openSelectbox();
|
||||
openSelectBox();
|
||||
|
||||
let options: any = [];
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -228,7 +228,7 @@ describe('DropdownSitesComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should be possiblle to select the default value', (done) => {
|
||||
it('should be possible to select the default value', (done) => {
|
||||
component.value = 'swsdp';
|
||||
fixture.detectChanges();
|
||||
|
||||
|
@@ -37,7 +37,7 @@ export class TagService {
|
||||
/**
|
||||
* Gets a list of tags added to a node.
|
||||
* @param nodeId ID of the target node
|
||||
* @returns TagPaging object (defined in JSAPI) containing the tags
|
||||
* @returns TagPaging object (defined in JS-API) containing the tags
|
||||
*/
|
||||
getTagsByNodeId(nodeId: string): any {
|
||||
return from(this.apiService.getInstance().core.tagsApi.getNodeTags(nodeId)).pipe(
|
||||
@@ -47,8 +47,8 @@ export class TagService {
|
||||
|
||||
/**
|
||||
* Gets a list of all the tags already defined in the repository.
|
||||
* @param opts Options supported by JSAPI
|
||||
* @returns TagPaging object (defined in JSAPI) containing the tags
|
||||
* @param opts Options supported by JS-API
|
||||
* @returns TagPaging object (defined in JS-API) containing the tags
|
||||
*/
|
||||
getAllTheTags(opts?: any): Observable<TagPaging> {
|
||||
return from(this.apiService.getInstance().core.tagsApi.getTags(opts))
|
||||
@@ -59,7 +59,7 @@ export class TagService {
|
||||
* Adds a tag to a node.
|
||||
* @param nodeId ID of the target node
|
||||
* @param tagName Name of the tag to add
|
||||
* @returns TagEntry object (defined in JSAPI) with details of the new tag
|
||||
* @returns TagEntry object (defined in JS-API) with details of the new tag
|
||||
*/
|
||||
addTag(nodeId: string, tagName: string): any {
|
||||
const alfrescoApi: any = this.apiService.getInstance();
|
||||
|
@@ -149,7 +149,7 @@ describe('UploadBase', () => {
|
||||
|
||||
});
|
||||
|
||||
describe('filesize', () => {
|
||||
describe('fileSize', () => {
|
||||
|
||||
const files: File[] = [
|
||||
<File> { name: 'bigFile.png', size: 1000 },
|
||||
@@ -353,7 +353,7 @@ describe('UploadBase', () => {
|
||||
let addToQueueSpy;
|
||||
|
||||
const files: File[] = [
|
||||
<File> { name: 'process.pbmn' }
|
||||
<File> { name: 'process.bpmn' }
|
||||
];
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -27,7 +27,7 @@ describe('FileUploadingDialogComponent', () => {
|
||||
let uploadService: UploadService;
|
||||
let component: FileUploadingDialogComponent;
|
||||
let emitter: EventEmitter<any>;
|
||||
let filelist: FileModel[];
|
||||
let fileList: FileModel[];
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
@@ -48,7 +48,7 @@ describe('FileUploadingDialogComponent', () => {
|
||||
uploadService.clearQueue();
|
||||
|
||||
emitter = new EventEmitter();
|
||||
filelist = [
|
||||
fileList = [
|
||||
new FileModel(<File> { name: 'fake-name', size: 10 }),
|
||||
new FileModel(<File> { name: 'fake-name2', size: 10 })
|
||||
];
|
||||
@@ -65,14 +65,14 @@ describe('FileUploadingDialogComponent', () => {
|
||||
});
|
||||
|
||||
it('should open dialog when uploading list is not empty', () => {
|
||||
uploadService.addToQueue(...filelist);
|
||||
uploadService.addToQueue(...fileList);
|
||||
uploadService.uploadFilesInTheQueue(emitter);
|
||||
|
||||
expect(component.isDialogActive).toBe(true);
|
||||
});
|
||||
|
||||
it('should update uploading file list', () => {
|
||||
uploadService.addToQueue(...filelist);
|
||||
uploadService.addToQueue(...fileList);
|
||||
uploadService.uploadFilesInTheQueue(emitter);
|
||||
|
||||
expect(component.filesUploadingList.length).toBe(2);
|
||||
@@ -204,7 +204,7 @@ describe('FileUploadingDialogComponent', () => {
|
||||
});
|
||||
|
||||
it('should reset upload queue', () => {
|
||||
uploadService.addToQueue(...filelist);
|
||||
uploadService.addToQueue(...fileList);
|
||||
uploadService.uploadFilesInTheQueue(emitter);
|
||||
component.close();
|
||||
|
||||
|
@@ -54,7 +54,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
|
||||
private errorSubscription: Subscription;
|
||||
|
||||
constructor(private uploadService: UploadService,
|
||||
private changeDetecor: ChangeDetectorRef) {
|
||||
private changeDetector: ChangeDetectorRef) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -73,18 +73,18 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
|
||||
)
|
||||
.subscribe((event: (FileUploadDeleteEvent | FileUploadCompleteEvent)) => {
|
||||
this.totalCompleted = event.totalComplete;
|
||||
this.changeDetecor.detectChanges();
|
||||
this.changeDetector.detectChanges();
|
||||
});
|
||||
|
||||
this.errorSubscription = this.uploadService.fileUploadError
|
||||
.subscribe((event: FileUploadErrorEvent) => {
|
||||
this.totalErrors = event.totalError;
|
||||
this.changeDetecor.detectChanges();
|
||||
this.changeDetector.detectChanges();
|
||||
});
|
||||
|
||||
this.fileUploadSubscription = this.uploadService
|
||||
.fileUpload.subscribe(() => {
|
||||
this.changeDetecor.detectChanges();
|
||||
this.changeDetector.detectChanges();
|
||||
});
|
||||
|
||||
this.uploadService.fileDeleted.subscribe((objId) => {
|
||||
@@ -94,7 +94,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
if (file) {
|
||||
file.status = FileUploadStatus.Cancelled;
|
||||
this.changeDetecor.detectChanges();
|
||||
this.changeDetector.detectChanges();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -112,7 +112,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel uploads and hide confiramtion
|
||||
* Cancel uploads and hide confirmation
|
||||
*/
|
||||
cancelAllUploads() {
|
||||
this.toggleConfirmation();
|
||||
@@ -125,7 +125,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
toggleMinimized(): void {
|
||||
this.isDialogMinimized = !this.isDialogMinimized;
|
||||
this.changeDetecor.detectChanges();
|
||||
this.changeDetector.detectChanges();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,7 +139,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
|
||||
this.isDialogActive = false;
|
||||
this.isDialogMinimized = false;
|
||||
this.uploadService.clearQueue();
|
||||
this.changeDetecor.detectChanges();
|
||||
this.changeDetector.detectChanges();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
@@ -249,7 +249,7 @@ describe('FileUploadingListComponent', () => {
|
||||
expect(component.isUploadCancelled()).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false when there is at leat one file in progress', () => {
|
||||
it('should return false when there is at least one file in progress', () => {
|
||||
component.files = <any> [
|
||||
{ status: FileUploadStatus.Progress },
|
||||
{ status: FileUploadStatus.Error },
|
||||
@@ -259,7 +259,7 @@ describe('FileUploadingListComponent', () => {
|
||||
expect(component.isUploadCancelled()).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false when there is at leat one file in pendding', () => {
|
||||
it('should return false when there is at least one file in pending', () => {
|
||||
component.files = <any> [
|
||||
{ status: FileUploadStatus.Pending },
|
||||
{ status: FileUploadStatus.Error },
|
||||
|
@@ -215,7 +215,7 @@ describe('UploadButtonComponent', () => {
|
||||
expect(compiled.querySelector('#uploadFolder-label-static').textContent).toEqual('test-text');
|
||||
});
|
||||
|
||||
describe('filesize', () => {
|
||||
describe('fileSize', () => {
|
||||
|
||||
const files: File[] = [
|
||||
<File> { name: 'bigFile.png', size: 1000 },
|
||||
|
@@ -84,7 +84,7 @@ export class UploadDragAreaComponent extends UploadBase implements NodePermissio
|
||||
*/
|
||||
onFolderEntityDropped(folder: any): void {
|
||||
if (!this.disabled && folder.isDirectory) {
|
||||
FileUtils.flattern(folder).then(filesInfo => {
|
||||
FileUtils.flatten(folder).then(filesInfo => {
|
||||
this.uploadFilesInfo(filesInfo);
|
||||
});
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ describe('FileDraggableDirective', () => {
|
||||
expect(component.enabled).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should not allow drad and drop when disabled', () => {
|
||||
it('should not allow drag and drop when disabled', () => {
|
||||
component.enabled = false;
|
||||
let event = new CustomEvent('custom-event');
|
||||
spyOn(event, 'preventDefault').and.stub();
|
||||
|
@@ -36,7 +36,7 @@ import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core
|
||||
* @InputParam {string} servicePath path where Web Script service is mapped default value 'service'
|
||||
* @InputParam {string} contentType JSON | HTML | DATATABLE | TEXT
|
||||
*
|
||||
* @Output - success - The event is emitted when the data are recived
|
||||
* @Output - success - The event is emitted when the data are received
|
||||
*
|
||||
*/
|
||||
@Component({
|
||||
@@ -91,13 +91,13 @@ export class WebscriptComponent implements OnChanges {
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this.apiService.getInstance().webScript.executeWebScript('GET', this.scriptPath, this.scriptArgs, this.contextRoot, this.servicePath).then((webScriptdata) => {
|
||||
this.apiService.getInstance().webScript.executeWebScript('GET', this.scriptPath, this.scriptArgs, this.contextRoot, this.servicePath).then((webScriptData) => {
|
||||
|
||||
this.data = webScriptdata;
|
||||
this.data = webScriptData;
|
||||
|
||||
if (this.showData) {
|
||||
if (this.contentType === 'DATATABLE') {
|
||||
this.data = this.showDataAsDataTable(webScriptdata);
|
||||
this.data = this.showDataAsDataTable(webScriptData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ export class WebscriptComponent implements OnChanges {
|
||||
*
|
||||
* @param data
|
||||
*
|
||||
* @retutns the data as datatable
|
||||
* @returns the data as datatable
|
||||
*/
|
||||
showDataAsDataTable(data: any) {
|
||||
let datatableData: any = null;
|
||||
|
@@ -33,7 +33,7 @@ describe('AppConfigService', () => {
|
||||
name: 'Custom Name'
|
||||
},
|
||||
files: {
|
||||
'excluded': ['exluded']
|
||||
'excluded': ['excluded']
|
||||
}
|
||||
};
|
||||
|
||||
@@ -141,7 +141,7 @@ describe('AppConfigService', () => {
|
||||
|
||||
it('should take excluded file list', () => {
|
||||
appConfigService.load().then(() => {
|
||||
expect(appConfigService.get('files.excluded')[0]).toBe('exluded');
|
||||
expect(appConfigService.get('files.excluded')[0]).toBe('excluded');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -21,6 +21,7 @@ import { ObjectUtils } from '../utils/object-utils';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { map, distinctUntilChanged } from 'rxjs/operators';
|
||||
|
||||
/* spellchecker: disable */
|
||||
export enum AppConfigValues {
|
||||
APP_CONFIG_LANGUAGES_KEY = 'languages',
|
||||
PROVIDERS = 'providers',
|
||||
@@ -36,6 +37,7 @@ export enum AppConfigValues {
|
||||
LOGIN_ROUTE = 'loginRoute',
|
||||
DISABLECSRF = 'disableCSRF'
|
||||
}
|
||||
/* spellchecker: enable */
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
@@ -111,7 +111,7 @@ describe('CardViewBoolItemComponent', () => {
|
||||
expect(value.nativeElement.checked).toBe(true);
|
||||
});
|
||||
|
||||
it('should render unticked checkbox if property value is false', () => {
|
||||
it('should render un-ticked checkbox if property value is false', () => {
|
||||
component.property.value = false;
|
||||
fixture.detectChanges();
|
||||
|
||||
@@ -120,7 +120,7 @@ describe('CardViewBoolItemComponent', () => {
|
||||
expect(value.nativeElement.checked).toBe(false);
|
||||
});
|
||||
|
||||
it('should render unticked checkbox if property value is not set but default is false and editable', () => {
|
||||
it('should render un-ticked checkbox if property value is not set but default is false and editable', () => {
|
||||
component.editable = true;
|
||||
component.property.editable = true;
|
||||
component.property.value = undefined;
|
||||
|
@@ -39,7 +39,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
component.property = new CardViewDateItemModel({
|
||||
label: 'Date label',
|
||||
value: new Date('07/10/2017'),
|
||||
key: 'datekey',
|
||||
key: 'dateKey',
|
||||
default: '',
|
||||
format: '',
|
||||
editable: false
|
||||
@@ -66,7 +66,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
component.property = new CardViewDateItemModel({
|
||||
label: 'Date label',
|
||||
value: '',
|
||||
key: 'datekey',
|
||||
key: 'dateKey',
|
||||
default: 'FAKE-DEFAULT-KEY',
|
||||
format: '',
|
||||
editable: false
|
||||
@@ -84,7 +84,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
component.property = new CardViewDateItemModel({
|
||||
label: 'Date label',
|
||||
value: '',
|
||||
key: 'datekey',
|
||||
key: 'dateKey',
|
||||
default: 'FAKE-DEFAULT-KEY',
|
||||
format: '',
|
||||
editable: false
|
||||
@@ -102,7 +102,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
component.property = new CardViewDateItemModel({
|
||||
label: 'Date label',
|
||||
value: '',
|
||||
key: 'datekey',
|
||||
key: 'dateKey',
|
||||
default: 'FAKE-DEFAULT-KEY',
|
||||
format: '',
|
||||
editable: true
|
||||
@@ -157,7 +157,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
expect(datePickerToggle).toBeNull('Datepicker toggle should NOT be shown');
|
||||
});
|
||||
|
||||
it('should open the dateXXXpicker when clicking on the label', () => {
|
||||
it('should open the datepicker when clicking on the label', () => {
|
||||
component.editable = true;
|
||||
component.property.editable = true;
|
||||
fixture.detectChanges();
|
||||
@@ -179,7 +179,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
let disposableUpdate = cardViewUpdateService.itemUpdated$.subscribe(
|
||||
(updateNotification) => {
|
||||
expect(updateNotification.target).toBe(component.property);
|
||||
expect(updateNotification.changed).toEqual({ datekey: expectedDate.toDate() });
|
||||
expect(updateNotification.changed).toEqual({ dateKey: expectedDate.toDate() });
|
||||
disposableUpdate.unsubscribe();
|
||||
done();
|
||||
}
|
||||
@@ -188,7 +188,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
component.onDateChanged({ value: expectedDate });
|
||||
});
|
||||
|
||||
it('should update the propery\'s value after a succesful update attempt', async(() => {
|
||||
it('should update the property value after a successful update attempt', async(() => {
|
||||
component.editable = true;
|
||||
component.property.editable = true;
|
||||
component.property.value = null;
|
||||
|
@@ -65,7 +65,7 @@ export class CardViewDateItemComponent implements OnInit {
|
||||
this.preferences.locale$.subscribe((locale) => {
|
||||
this.dateAdapter.setLocale(locale);
|
||||
});
|
||||
(<MomentDateAdapter> this.dateAdapter).overrideDisplyaFormat = this.SHOW_FORMAT;
|
||||
(<MomentDateAdapter> this.dateAdapter).overrideDisplayFormat = this.SHOW_FORMAT;
|
||||
|
||||
if (this.property.value) {
|
||||
this.valueDate = moment(this.property.value, this.SHOW_FORMAT);
|
||||
|
@@ -89,7 +89,7 @@ describe('CardViewItemDispatcherComponent', () => {
|
||||
TestBed.resetTestingModule();
|
||||
});
|
||||
|
||||
describe('Subcompomnent creation', () => {
|
||||
describe('Sub-component creation', () => {
|
||||
|
||||
it('should load the CardViewShinyCustomElementItemComponent', () => {
|
||||
const innerElement = fixture.debugElement.query(By.css('[data-automation-id="found-me"]'));
|
||||
@@ -136,7 +136,7 @@ describe('CardViewItemDispatcherComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Angular lifecycle methods', () => {
|
||||
describe('Angular life-cycle methods', () => {
|
||||
|
||||
let shinyCustomElementItemComponent;
|
||||
|
||||
@@ -155,7 +155,7 @@ describe('CardViewItemDispatcherComponent', () => {
|
||||
shinyCustomElementItemComponent = fixture.debugElement.query(By.css('whatever-you-want-to-have')).componentInstance;
|
||||
});
|
||||
|
||||
it('should call through the lifecycle methods', () => {
|
||||
it('should call through the life-cycle methods', () => {
|
||||
lifeCycleMethods.forEach((lifeCycleMethod) => {
|
||||
shinyCustomElementItemComponent[lifeCycleMethod] = () => {};
|
||||
spyOn(shinyCustomElementItemComponent, lifeCycleMethod);
|
||||
@@ -167,7 +167,7 @@ describe('CardViewItemDispatcherComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should NOT call through the lifecycle methods if the method does not exist (no error should be thrown)', () => {
|
||||
it('should NOT call through the life-cycle methods if the method does not exist (no error should be thrown)', () => {
|
||||
const param = {};
|
||||
lifeCycleMethods.forEach((lifeCycleMethod) => {
|
||||
shinyCustomElementItemComponent[lifeCycleMethod] = undefined;
|
||||
|
@@ -53,7 +53,7 @@ export class CardViewItemDispatcherComponent implements OnChanges {
|
||||
|
||||
constructor(private cardItemTypeService: CardItemTypeService,
|
||||
private resolver: ComponentFactoryResolver) {
|
||||
const dynamicLifecycleMethods = [
|
||||
const dynamicLifeCycleMethods = [
|
||||
'ngOnInit',
|
||||
'ngDoCheck',
|
||||
'ngAfterContentInit',
|
||||
@@ -63,8 +63,8 @@ export class CardViewItemDispatcherComponent implements OnChanges {
|
||||
'ngOnDestroy'
|
||||
];
|
||||
|
||||
dynamicLifecycleMethods.forEach((dynamicLifecycleMethod) => {
|
||||
this[dynamicLifecycleMethod] = this.proxy.bind(this, dynamicLifecycleMethod);
|
||||
dynamicLifeCycleMethods.forEach(method => {
|
||||
this[method] = this.proxy.bind(this, method);
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -289,7 +289,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
expect(component.errorMessages).toBe(expectedErrorMessages);
|
||||
});
|
||||
|
||||
it('should update the propery\'s value after a succesful update attempt', async(() => {
|
||||
it('should update the property value after a successful update attempt', async(() => {
|
||||
component.property.isValid = () => true;
|
||||
component.update();
|
||||
|
||||
|
@@ -49,13 +49,13 @@ describe('AccordionGroupComponent', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
let accordin = element.querySelector('mat-accordion');
|
||||
let accordion = element.querySelector('mat-accordion');
|
||||
let expansionPanel = element.querySelector('mat-expansion-panel');
|
||||
let accordinHeader = element.querySelector('mat-expansion-panel-header');
|
||||
let accordionHeader = element.querySelector('mat-expansion-panel-header');
|
||||
let content = element.querySelector('#adf-expansion-panel-content-id').innerHTML;
|
||||
expect(accordin).toBeDefined();
|
||||
expect(accordion).toBeDefined();
|
||||
expect(expansionPanel).toBeDefined();
|
||||
expect(accordinHeader).toBeDefined();
|
||||
expect(accordionHeader).toBeDefined();
|
||||
expect(content).toEqual('<a>Test</a>');
|
||||
});
|
||||
}));
|
||||
|
@@ -22,7 +22,7 @@ import { MaterialModule } from '../material.module';
|
||||
import { AccordionGroupComponent } from './accordion-group.component';
|
||||
import { AccordionComponent } from './accordion.component';
|
||||
|
||||
// @deprecated 2.3.0 use the material accodrdion
|
||||
// @deprecated 2.3.0 use the material accordion
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@@ -203,10 +203,10 @@ describe('CommentListComponent', () => {
|
||||
}));
|
||||
|
||||
it('comment date time should start with few seconds ago when comment date is few seconds ago', async(() => {
|
||||
let commenFewSecond = Object.assign({}, processCommentOne);
|
||||
commenFewSecond.created = new Date();
|
||||
let commentFewSecond = Object.assign({}, processCommentOne);
|
||||
commentFewSecond.created = new Date();
|
||||
|
||||
commentList.comments = [commenFewSecond];
|
||||
commentList.comments = [commentFewSecond];
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
|
@@ -182,7 +182,7 @@ describe('ContextMenuHolderComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should ajust position relative to right margin of the screen', fakeAsync(() => {
|
||||
it('should adjust position relative to right margin of the screen', fakeAsync(() => {
|
||||
const contextMenuEvent = {
|
||||
clientX: 1000,
|
||||
clientY: 210
|
||||
@@ -197,7 +197,7 @@ describe('ContextMenuHolderComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should ajust position relative to bottom margin of the screen', fakeAsync(() => {
|
||||
it('should adjust position relative to bottom margin of the screen', fakeAsync(() => {
|
||||
const contextMenuEvent = {
|
||||
clientX: 100,
|
||||
clientY: 600
|
||||
@@ -212,7 +212,7 @@ describe('ContextMenuHolderComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should ajust position relative to bottom - right margin of the screen', fakeAsync(() => {
|
||||
it('should adjust position relative to bottom - right margin of the screen', fakeAsync(() => {
|
||||
const contextMenuEvent = {
|
||||
clientX: 900,
|
||||
clientY: 610
|
||||
@@ -248,7 +248,7 @@ describe('ContextMenuHolderComponent', () => {
|
||||
expect(component.menuTrigger.menu.yPosition).toBe('below');
|
||||
}));
|
||||
|
||||
it('should ajust direction relative to right margin of the screen', fakeAsync(() => {
|
||||
it('should adjust direction relative to right margin of the screen', fakeAsync(() => {
|
||||
const contextMenuEvent = {
|
||||
clientX: 1000,
|
||||
clientY: 210
|
||||
@@ -261,7 +261,7 @@ describe('ContextMenuHolderComponent', () => {
|
||||
expect(component.menuTrigger.menu.yPosition).toBe('below');
|
||||
}));
|
||||
|
||||
it('should ajust direction relative to bottom margin of the screen', fakeAsync(() => {
|
||||
it('should adjust direction relative to bottom margin of the screen', fakeAsync(() => {
|
||||
const contextMenuEvent = {
|
||||
clientX: 100,
|
||||
clientY: 600
|
||||
@@ -274,7 +274,7 @@ describe('ContextMenuHolderComponent', () => {
|
||||
expect(component.menuTrigger.menu.yPosition).toBe('above');
|
||||
}));
|
||||
|
||||
it('should ajust position relative to bottom - right margin of the screen', fakeAsync(() => {
|
||||
it('should adjust position relative to bottom - right margin of the screen', fakeAsync(() => {
|
||||
const contextMenuEvent = {
|
||||
clientX: 900,
|
||||
clientY: 610
|
||||
|
@@ -262,7 +262,7 @@ describe('DataTable', () => {
|
||||
});
|
||||
|
||||
it('should set custom sort order', () => {
|
||||
const dataSortObj = new DataSorting('dummayName', 'asc');
|
||||
const dataSortObj = new DataSorting('dummyName', 'asc');
|
||||
const dataRows =
|
||||
[
|
||||
{ name: 'test1' },
|
||||
@@ -270,7 +270,7 @@ describe('DataTable', () => {
|
||||
{ name: 'test3' },
|
||||
{ name: 'test4' }
|
||||
];
|
||||
dataTable.sorting = [ 'dummayName', 'asc' ];
|
||||
dataTable.sorting = [ 'dummyName', 'asc' ];
|
||||
dataTable.ngOnChanges({
|
||||
rows: new SimpleChange(null, dataRows, false)
|
||||
});
|
||||
|
@@ -70,8 +70,8 @@ export abstract class DataTableSchema {
|
||||
return schema;
|
||||
}
|
||||
|
||||
public getSchemaFromConfig(presetColoumn: string): DataColumn[] {
|
||||
return presetColoumn ? (this.layoutPresets[presetColoumn]).map(col => new ObjectDataColumn(col)) : [];
|
||||
public getSchemaFromConfig(presetColumn: string): DataColumn[] {
|
||||
return presetColumn ? (this.layoutPresets[presetColumn]).map(col => new ObjectDataColumn(col)) : [];
|
||||
}
|
||||
|
||||
private getDefaultLayoutPreset(): DataColumn[] {
|
||||
|
@@ -23,6 +23,7 @@ import { HighlightDirective } from './highlight.directive';
|
||||
import { setupTestBed } from '../testing/setupTestBed';
|
||||
import { CoreModule } from '../core.module';
|
||||
|
||||
/* spellchecker: disable */
|
||||
const template: string = `
|
||||
<div id="outerDiv1" adf-highlight adf-highlight-selector=".highlightable" adf-highlight-class="highlight-for-free-willy">
|
||||
<div id="innerDiv11" class="highlightable">Lorem ipsum salana-eyong-aysis dolor sit amet</div>
|
||||
@@ -36,7 +37,7 @@ const template: string = `
|
||||
|
||||
@Component({ selector: 'adf-test-component', template })
|
||||
class TestComponent {
|
||||
@ViewChildren(HighlightDirective) public hightlightDirectives;
|
||||
@ViewChildren(HighlightDirective) public highlightDirectives;
|
||||
}
|
||||
|
||||
describe('HighlightDirective', () => {
|
||||
@@ -59,8 +60,8 @@ describe('HighlightDirective', () => {
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should replace the searched text with the default hightlight class in the proper element (adf-highlight-selector)', () => {
|
||||
component.hightlightDirectives.last.highlight('salana-eyong-aysis');
|
||||
it('should replace the searched text with the default highlight class in the proper element (adf-highlight-selector)', () => {
|
||||
component.highlightDirectives.last.highlight('salana-eyong-aysis');
|
||||
fixture.detectChanges();
|
||||
|
||||
const containerElement = fixture.debugElement.query(By.css('#innerDiv21'));
|
||||
@@ -68,8 +69,8 @@ describe('HighlightDirective', () => {
|
||||
expect(containerElement.nativeElement.innerHTML).toBe('Lorem ipsum <span class="adf-highlight">salana-eyong-aysis</span> dolor sit amet');
|
||||
});
|
||||
|
||||
it('should replace the searched text with the default hightlight class in every proper element (highlight-for-free-willy)', () => {
|
||||
component.hightlightDirectives.first.highlight('salana-eyong-aysis');
|
||||
it('should replace the searched text with the default highlight class in every proper element (highlight-for-free-willy)', () => {
|
||||
component.highlightDirectives.first.highlight('salana-eyong-aysis');
|
||||
fixture.detectChanges();
|
||||
|
||||
const containerElement1 = fixture.debugElement.query(By.css('#innerDiv11'));
|
||||
@@ -81,7 +82,7 @@ describe('HighlightDirective', () => {
|
||||
});
|
||||
|
||||
it('should NOT replace the searched text in an element without the proper selector class', () => {
|
||||
component.hightlightDirectives.first.highlight('salana-eyong-aysis');
|
||||
component.highlightDirectives.first.highlight('salana-eyong-aysis');
|
||||
fixture.detectChanges();
|
||||
|
||||
const containerElement1 = fixture.debugElement.query(By.css('#innerDiv12'));
|
||||
@@ -92,7 +93,7 @@ describe('HighlightDirective', () => {
|
||||
it('should NOT reinsert the same text to the innerText if there was no change at all (search string is not found)', () => {
|
||||
const highlighter = TestBed.get(HighlightTransformService);
|
||||
spyOn(highlighter, 'highlight').and.returnValue({ changed: false, text: 'Modified text' });
|
||||
component.hightlightDirectives.first.highlight('salana-eyong-aysis');
|
||||
component.highlightDirectives.first.highlight('salana-eyong-aysis');
|
||||
fixture.detectChanges();
|
||||
|
||||
const containerElement = fixture.debugElement.query(By.css('#innerDiv11'));
|
||||
@@ -103,7 +104,7 @@ describe('HighlightDirective', () => {
|
||||
it('should do the search only if there is a search string presented', () => {
|
||||
const highlighter = TestBed.get(HighlightTransformService);
|
||||
spyOn(highlighter, 'highlight').and.callThrough();
|
||||
component.hightlightDirectives.first.highlight('');
|
||||
component.highlightDirectives.first.highlight('');
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(highlighter.highlight).not.toHaveBeenCalled();
|
||||
@@ -114,7 +115,7 @@ describe('HighlightDirective', () => {
|
||||
spyOn(highlighter, 'highlight').and.callThrough();
|
||||
|
||||
const callback = function() {
|
||||
component.hightlightDirectives.first.highlight('raddish', '');
|
||||
component.highlightDirectives.first.highlight('raddish', '');
|
||||
fixture.detectChanges();
|
||||
};
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
/* tslint:disable:no-input-rename */
|
||||
|
||||
import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';
|
||||
import { HighlightTransformService, HightlightTransformResult } from '../services/highlight-transform.service';
|
||||
import { HighlightTransformService, HighlightTransformResult } from '../services/highlight-transform.service';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-highlight]'
|
||||
@@ -47,7 +47,7 @@ export class HighlightDirective {
|
||||
const elements = this.el.nativeElement.querySelectorAll(selector);
|
||||
|
||||
elements.forEach((element) => {
|
||||
const result: HightlightTransformResult = this.highlightTransformService.highlight(element.innerHTML, search, classToApply);
|
||||
const result: HighlightTransformResult = this.highlightTransformService.highlight(element.innerHTML, search, classToApply);
|
||||
if (result.changed) {
|
||||
this.renderer.setProperty(element, 'innerHTML', result.text);
|
||||
}
|
||||
|
@@ -128,11 +128,11 @@ describe('LogoutDirective', () => {
|
||||
|
||||
});
|
||||
|
||||
describe('enabelRedirect', () => {
|
||||
describe('enableRedirect', () => {
|
||||
|
||||
@Component({
|
||||
selector: 'adf-test-component',
|
||||
template: '<button adf-logout [enabelRedirect]="false"></button>'
|
||||
template: '<button adf-logout [enableRedirect]="false"></button>'
|
||||
})
|
||||
class TestComponent {
|
||||
@ContentChildren(LogoutDirective)
|
||||
@@ -160,7 +160,7 @@ describe('LogoutDirective', () => {
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should not redirect if enabelRedirect is false', () => {
|
||||
it('should not redirect if enableRedirect is false', () => {
|
||||
spyOn(router, 'navigate');
|
||||
spyOn(authService, 'logout').and.returnValue(of(true));
|
||||
const button = fixture.nativeElement.querySelector('button');
|
||||
|
@@ -30,7 +30,7 @@ export class LogoutDirective implements OnInit {
|
||||
|
||||
/** Enable redirect after logout */
|
||||
@Input()
|
||||
enabelRedirect: boolean = true;
|
||||
enableRedirect: boolean = true;
|
||||
|
||||
constructor(private elementRef: ElementRef,
|
||||
private renderer: Renderer2,
|
||||
@@ -55,7 +55,7 @@ export class LogoutDirective implements OnInit {
|
||||
}
|
||||
|
||||
redirectToUri() {
|
||||
if (this.enabelRedirect) {
|
||||
if (this.enableRedirect) {
|
||||
this.router.navigate([this.redirectUri]);
|
||||
}
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ export class NodePermissionDirective implements OnChanges {
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates disabled state for the decorated elememtn
|
||||
* Updates disabled state for the decorated element
|
||||
*
|
||||
* @memberof NodePermissionDirective
|
||||
*/
|
||||
|
@@ -80,10 +80,10 @@ export class NodeRestoreDirective {
|
||||
mergeMap(() => this.getDeletedNodes())
|
||||
)
|
||||
.subscribe(deletedNodesList => {
|
||||
const { entries: nodelist } = deletedNodesList.list;
|
||||
const { entries: nodeList } = deletedNodesList.list;
|
||||
const { fail: restoreErrorNodes } = this.restoreProcessStatus;
|
||||
const selectedNodes = this.diff(restoreErrorNodes, selection, false);
|
||||
const remainingNodes = this.diff(selectedNodes, nodelist);
|
||||
const remainingNodes = this.diff(selectedNodes, nodeList);
|
||||
|
||||
if (!remainingNodes.length) {
|
||||
this.notification();
|
||||
|
@@ -140,9 +140,9 @@ export class UploadDirective implements OnInit, OnDestroy {
|
||||
this.element.classList.remove(this.cssClassName);
|
||||
this.isDragging = false;
|
||||
|
||||
const dataTranfer = this.getDataTransfer(event);
|
||||
if (dataTranfer) {
|
||||
this.getFilesDropped(dataTranfer).then(files => {
|
||||
const dataTransfer = this.getDataTransfer(event);
|
||||
if (dataTransfer) {
|
||||
this.getFilesDropped(dataTransfer).then(files => {
|
||||
this.onUploadFiles(files);
|
||||
});
|
||||
|
||||
@@ -211,7 +211,7 @@ export class UploadDirective implements OnInit, OnDestroy {
|
||||
}));
|
||||
} else if (item.isDirectory) {
|
||||
iterations.push(new Promise(resolveFolder => {
|
||||
FileUtils.flattern(item).then(files => resolveFolder(files));
|
||||
FileUtils.flatten(item).then(files => resolveFolder(files));
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@@ -762,7 +762,7 @@ describe('FormComponent', () => {
|
||||
expect(formComponent.isOutcomeButtonEnabled(outcome)).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should disable oucome buttons for invalid form', () => {
|
||||
it('should disable outcome buttons for invalid form', () => {
|
||||
let formModel = new FormModel();
|
||||
let field = new FormFieldModel(formModel, {
|
||||
type: 'text',
|
||||
|
@@ -126,7 +126,7 @@ describe('StartFormComponent', () => {
|
||||
expect(component.outcomesContainer).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should fetch start form detasils by processDefinitionId ', () => {
|
||||
it('should fetch start form details by processDefinitionId ', () => {
|
||||
getStartFormSpy.and.returnValue(of(startMockForm));
|
||||
component.processDefinitionId = exampleId1;
|
||||
component.showOutcomeButtons = true;
|
||||
@@ -136,7 +136,7 @@ describe('StartFormComponent', () => {
|
||||
expect(getStartFormSpy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
describe('Disply widgets', () => {
|
||||
describe('Display widgets', () => {
|
||||
|
||||
it('should be able to display a textWidget from a process definition', () => {
|
||||
getStartFormSpy.and.returnValue(of(startFormTextDefinitionMock));
|
||||
@@ -280,7 +280,7 @@ describe('StartFormComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should disply start form with fields ', async(() => {
|
||||
it('should display start form with fields ', async(() => {
|
||||
getStartFormSpy.and.returnValue(of(startMockForm));
|
||||
component.processDefinitionId = exampleId1;
|
||||
component.showOutcomeButtons = true;
|
||||
@@ -315,6 +315,7 @@ describe('StartFormComponent', () => {
|
||||
const refreshElement = fixture.debugElement.nativeElement.querySelector('.mat-card-actions>button');
|
||||
refreshElement.click();
|
||||
fixture.detectChanges();
|
||||
/* cspell:disable-next-line */
|
||||
const selectElement = fixture.debugElement.nativeElement.querySelector('#claimtype');
|
||||
const selectLabelElement = fixture.debugElement.nativeElement.querySelector('.adf-dropdown-widget > .adf-label');
|
||||
expect(refreshElement).toBeDefined();
|
||||
@@ -323,7 +324,7 @@ describe('StartFormComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should difine custom-tabs ', async(() => {
|
||||
it('should define custom-tabs ', async(() => {
|
||||
getStartFormSpy.and.returnValue(of(startMockFormWithTab));
|
||||
component.processDefinitionId = exampleId1;
|
||||
component.showOutcomeButtons = true;
|
||||
@@ -341,7 +342,7 @@ describe('StartFormComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should difine title and [custom-action-buttons]', async(() => {
|
||||
it('should define title and [custom-action-buttons]', async(() => {
|
||||
getStartFormSpy.and.returnValue(of(startMockFormWithTab));
|
||||
component.processDefinitionId = exampleId1;
|
||||
component.showOutcomeButtons = true;
|
||||
|
@@ -115,7 +115,7 @@ export class StartFormComponent extends FormComponent implements OnChanges, OnIn
|
||||
}
|
||||
|
||||
loadStartForm(processId: string) {
|
||||
this.formService.getProcessIntance(processId)
|
||||
this.formService.getProcessInstance(processId)
|
||||
.subscribe((instance: any) => {
|
||||
this.formService
|
||||
.getStartFormInstance(processId)
|
||||
|
@@ -133,7 +133,7 @@ describe('ContentWidgetComponent', () => {
|
||||
created: 1490354907883,
|
||||
createdBy: {
|
||||
id: 2,
|
||||
firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com'
|
||||
firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com'
|
||||
},
|
||||
relatedContent: false,
|
||||
contentAvailable: true,
|
||||
@@ -176,7 +176,7 @@ describe('ContentWidgetComponent', () => {
|
||||
created: 1490354907883,
|
||||
createdBy: {
|
||||
id: 2,
|
||||
firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com'
|
||||
firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com'
|
||||
},
|
||||
relatedContent: false,
|
||||
contentAvailable: true,
|
||||
@@ -215,7 +215,7 @@ describe('ContentWidgetComponent', () => {
|
||||
created: 1490354907883,
|
||||
createdBy: {
|
||||
id: 2,
|
||||
firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com'
|
||||
firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com'
|
||||
},
|
||||
relatedContent: false,
|
||||
contentAvailable: false,
|
||||
@@ -239,7 +239,7 @@ describe('ContentWidgetComponent', () => {
|
||||
created: 1490354907883,
|
||||
createdBy: {
|
||||
id: 2,
|
||||
firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com'
|
||||
firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com'
|
||||
},
|
||||
relatedContent: false,
|
||||
contentAvailable: true,
|
||||
@@ -273,7 +273,7 @@ describe('ContentWidgetComponent', () => {
|
||||
created: 1490354907883,
|
||||
createdBy: {
|
||||
id: 2,
|
||||
firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com'
|
||||
firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com'
|
||||
},
|
||||
relatedContent: false,
|
||||
contentAvailable: true,
|
||||
|
@@ -36,7 +36,7 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
private _required: boolean = false;
|
||||
|
||||
readonly defaultDateFormat: string = 'D-M-YYYY';
|
||||
readonly deafultDateTimeFormat: string = 'D-M-YYYY hh:mm A';
|
||||
readonly defaultDateTimeFormat: string = 'D-M-YYYY hh:mm A';
|
||||
|
||||
// model members
|
||||
fieldType: string;
|
||||
@@ -209,10 +209,10 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
jsonField.params.field) {
|
||||
originalType = jsonField.params.field.type;
|
||||
}
|
||||
return originalType === FormFieldTypes.DATETIME ? this.deafultDateTimeFormat : this.defaultDateFormat;
|
||||
return originalType === FormFieldTypes.DATETIME ? this.defaultDateTimeFormat : this.defaultDateFormat;
|
||||
}
|
||||
|
||||
private isTypeaHeadFieldType(type: string): boolean {
|
||||
private isTypeaheadFieldType(type: string): boolean {
|
||||
return type === 'typeahead' ? true : false;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
|
||||
private getProcessVariableValue(field: any, form: FormModel) {
|
||||
let fieldName = field.name;
|
||||
if (this.isTypeaHeadFieldType(field.type)) {
|
||||
if (this.isTypeaheadFieldType(field.type)) {
|
||||
fieldName = this.getFieldNameWithLabel(field.id);
|
||||
}
|
||||
return this.findProcessVariableValue(fieldName, form);
|
||||
@@ -400,6 +400,7 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
case FormFieldTypes.DATETIME:
|
||||
const dateTimeValue = moment(this.value, this.dateDisplayFormat, true);
|
||||
if (dateTimeValue && dateTimeValue.isValid()) {
|
||||
/* cspell:disable-next-line */
|
||||
this.form.values[this.id] = dateTimeValue.format('YYYY-MM-DDTHH:mm:ssZ');
|
||||
} else {
|
||||
this.form.values[this.id] = null;
|
||||
|
@@ -58,7 +58,7 @@ export class DateTimeWidgetComponent extends WidgetComponent implements OnInit {
|
||||
this.dateAdapter.setLocale(locale);
|
||||
});
|
||||
let momentDateAdapter = <MomentDateAdapter> this.dateAdapter;
|
||||
momentDateAdapter.overrideDisplyaFormat = this.field.dateDisplayFormat;
|
||||
momentDateAdapter.overrideDisplayFormat = this.field.dateDisplayFormat;
|
||||
|
||||
if (this.field) {
|
||||
if (this.field.minValue) {
|
||||
|
@@ -55,7 +55,7 @@ export class DateWidgetComponent extends WidgetComponent implements OnInit {
|
||||
this.dateAdapter.setLocale(locale);
|
||||
});
|
||||
let momentDateAdapter = <MomentDateAdapter> this.dateAdapter;
|
||||
momentDateAdapter.overrideDisplyaFormat = this.field.dateDisplayFormat;
|
||||
momentDateAdapter.overrideDisplayFormat = this.field.dateDisplayFormat;
|
||||
|
||||
if (this.field) {
|
||||
if (this.field.minValue) {
|
||||
|
@@ -114,7 +114,7 @@ describe('DynamicTableWidgetComponent', () => {
|
||||
expect(widget.content.selectedRow).toBe(row);
|
||||
});
|
||||
|
||||
it('should requre table to select clicked row', () => {
|
||||
it('should require table to select clicked row', () => {
|
||||
let row = <DynamicTableRow> {selected: false};
|
||||
widget.content = null;
|
||||
widget.onRowClicked(row);
|
||||
|
@@ -95,8 +95,8 @@ export class DynamicTableWidgetComponent extends WidgetComponent implements OnIn
|
||||
}
|
||||
}
|
||||
|
||||
private isEnterOrSpacePressed(keycode) {
|
||||
return this.selectArrayCode.indexOf(keycode) !== -1;
|
||||
private isEnterOrSpacePressed(keyCode) {
|
||||
return this.selectArrayCode.indexOf(keyCode) !== -1;
|
||||
}
|
||||
|
||||
hasSelection(): boolean {
|
||||
|
@@ -63,7 +63,7 @@ export class DateEditorComponent implements OnInit {
|
||||
this.dateAdapter.setLocale(locale);
|
||||
});
|
||||
let momentDateAdapter = <MomentDateAdapter> this.dateAdapter;
|
||||
momentDateAdapter.overrideDisplyaFormat = this.DATE_FORMAT;
|
||||
momentDateAdapter.overrideDisplayFormat = this.DATE_FORMAT;
|
||||
|
||||
this.value = moment(this.table.getCellValue(this.row, this.column), 'YYYY-MM-DD');
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ export class DateTimeEditorComponent implements OnInit {
|
||||
this.dateAdapter.setLocale(locale);
|
||||
});
|
||||
let momentDateAdapter = <MomentDateAdapter> this.dateAdapter;
|
||||
momentDateAdapter.overrideDisplyaFormat = this.DATE_FORMAT;
|
||||
momentDateAdapter.overrideDisplayFormat = this.DATE_FORMAT;
|
||||
|
||||
this.value = moment(this.table.getCellValue(this.row, this.column), this.DATE_FORMAT);
|
||||
}
|
||||
|
@@ -140,7 +140,7 @@ describe('DropdownEditorComponent', () => {
|
||||
expect(component.value).toBe(row.value[column.id]);
|
||||
});
|
||||
|
||||
it('should handle REST error gettig options with task id', () => {
|
||||
it('should handle REST error getting options with task id', () => {
|
||||
column.optionType = 'rest';
|
||||
const error = 'error';
|
||||
|
||||
|
@@ -117,7 +117,7 @@ describe('TextWidgetComponent', () => {
|
||||
params: {inputMask: '##-##0,00%'},
|
||||
type: FormFieldTypes.TEXT,
|
||||
readOnly: false,
|
||||
placeholder: 'simple palceholder'
|
||||
placeholder: 'simple placeholder'
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
@@ -132,7 +132,7 @@ describe('TextWidgetComponent', () => {
|
||||
it('should show the field placeholder', () => {
|
||||
expect(inputElement).toBeDefined();
|
||||
expect(inputElement).not.toBeNull();
|
||||
expect(inputElement.placeholder).toBe('simple palceholder');
|
||||
expect(inputElement.placeholder).toBe('simple placeholder');
|
||||
});
|
||||
|
||||
it('should show the field placeholder when clicked', async(() => {
|
||||
@@ -142,7 +142,7 @@ describe('TextWidgetComponent', () => {
|
||||
fixture.detectChanges();
|
||||
expect(inputElement).toBeDefined();
|
||||
expect(inputElement).not.toBeNull();
|
||||
expect(inputElement.placeholder).toBe('simple palceholder');
|
||||
expect(inputElement.placeholder).toBe('simple placeholder');
|
||||
});
|
||||
}));
|
||||
|
||||
@@ -194,7 +194,7 @@ describe('TextWidgetComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should autofill masked configured value on keyUp event', async(() => {
|
||||
it('should auto-fill masked configured value on keyUp event', async(() => {
|
||||
expect(element.querySelector('#text-id')).not.toBeNull();
|
||||
|
||||
inputElement.value = '12345678';
|
||||
@@ -263,7 +263,7 @@ describe('TextWidgetComponent', () => {
|
||||
params: {inputMask: '##-##0,00%', inputMaskPlaceholder: 'Phone : (__) ___-___'},
|
||||
type: FormFieldTypes.TEXT,
|
||||
readOnly: false,
|
||||
placeholder: 'simple palceholder'
|
||||
placeholder: 'simple placeholder'
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
|
@@ -294,13 +294,13 @@ describe('TypeaheadWidgetComponent', () => {
|
||||
}));
|
||||
|
||||
it('should show typeahead options', async(() => {
|
||||
let typeahedElement = fixture.debugElement.query(By.css('#typeahead-id'));
|
||||
let typeahedHTMLElement: HTMLInputElement = <HTMLInputElement> typeahedElement.nativeElement;
|
||||
typeahedHTMLElement.focus();
|
||||
let typeaheadElement = fixture.debugElement.query(By.css('#typeahead-id'));
|
||||
let typeaheadHTMLElement: HTMLInputElement = <HTMLInputElement> typeaheadElement.nativeElement;
|
||||
typeaheadHTMLElement.focus();
|
||||
typeaheadWidgetComponent.value = 'F';
|
||||
typeahedHTMLElement.value = 'F';
|
||||
typeahedHTMLElement.dispatchEvent(new Event('keyup'));
|
||||
typeahedHTMLElement.dispatchEvent(new Event('input'));
|
||||
typeaheadHTMLElement.value = 'F';
|
||||
typeaheadHTMLElement.dispatchEvent(new Event('keyup'));
|
||||
typeaheadHTMLElement.dispatchEvent(new Event('input'));
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
@@ -311,21 +311,21 @@ describe('TypeaheadWidgetComponent', () => {
|
||||
}));
|
||||
|
||||
it('should hide the option when the value is empty', async(() => {
|
||||
let typeahedElement = fixture.debugElement.query(By.css('#typeahead-id'));
|
||||
let typeahedHTMLElement: HTMLInputElement = <HTMLInputElement> typeahedElement.nativeElement;
|
||||
typeahedHTMLElement.focus();
|
||||
let typeaheadElement = fixture.debugElement.query(By.css('#typeahead-id'));
|
||||
let typeaheadHTMLElement: HTMLInputElement = <HTMLInputElement> typeaheadElement.nativeElement;
|
||||
typeaheadHTMLElement.focus();
|
||||
typeaheadWidgetComponent.value = 'F';
|
||||
typeahedHTMLElement.value = 'F';
|
||||
typeahedHTMLElement.dispatchEvent(new Event('keyup'));
|
||||
typeahedHTMLElement.dispatchEvent(new Event('input'));
|
||||
typeaheadHTMLElement.value = 'F';
|
||||
typeaheadHTMLElement.dispatchEvent(new Event('keyup'));
|
||||
typeaheadHTMLElement.dispatchEvent(new Event('input'));
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.query(By.css('[id="typeahead-name_option_1"]'))).not.toBeNull();
|
||||
typeahedHTMLElement.focus();
|
||||
typeaheadHTMLElement.focus();
|
||||
typeaheadWidgetComponent.value = '';
|
||||
typeahedHTMLElement.dispatchEvent(new Event('keyup'));
|
||||
typeahedHTMLElement.dispatchEvent(new Event('input'));
|
||||
typeaheadHTMLElement.dispatchEvent(new Event('keyup'));
|
||||
typeaheadHTMLElement.dispatchEvent(new Event('input'));
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
|
@@ -301,6 +301,7 @@ describe('UploadWidgetComponent', () => {
|
||||
}));
|
||||
|
||||
it('should show correctly the file name when is formed with French characters', async(() => {
|
||||
// cspell: disable-next
|
||||
uploadWidgetComponent.field.value.push(fakeCreationFile('Àâæçéèêëïîôœùûüÿ.jpg', 12));
|
||||
|
||||
fixture.detectChanges();
|
||||
@@ -309,11 +310,13 @@ describe('UploadWidgetComponent', () => {
|
||||
fixture.detectChanges();
|
||||
let jpegElement = element.querySelector('#file-12');
|
||||
expect(jpegElement).not.toBeNull();
|
||||
// cspell: disable-next
|
||||
expect(jpegElement.textContent).toBe('Àâæçéèêëïîôœùûüÿ.jpg');
|
||||
});
|
||||
}));
|
||||
|
||||
it('should show correctly the file name when is formed with Greek characters', async(() => {
|
||||
// cspell: disable-next
|
||||
uploadWidgetComponent.field.value.push(fakeCreationFile('άέήίϊϊΐόύϋΰώθωερτψυιοπασδφγηςκλζχξωβνμ.jpg', 13));
|
||||
|
||||
fixture.detectChanges();
|
||||
@@ -322,6 +325,7 @@ describe('UploadWidgetComponent', () => {
|
||||
fixture.detectChanges();
|
||||
let jpegElement = element.querySelector('#file-13');
|
||||
expect(jpegElement).not.toBeNull();
|
||||
// cspell: disable-next
|
||||
expect(jpegElement.textContent).toBe('άέήίϊϊΐόύϋΰώθωερτψυιοπασδφγηςκλζχξωβνμ.jpg');
|
||||
});
|
||||
}));
|
||||
@@ -351,6 +355,7 @@ describe('UploadWidgetComponent', () => {
|
||||
}));
|
||||
|
||||
it('should show correctly the file name when is formed with Swedish characters', async(() => {
|
||||
// cspell: disable-next
|
||||
uploadWidgetComponent.field.value.push(fakeCreationFile('Äåéö.jpg', 16));
|
||||
fixture.detectChanges();
|
||||
|
||||
@@ -358,6 +363,7 @@ describe('UploadWidgetComponent', () => {
|
||||
fixture.detectChanges();
|
||||
let jpegElement = element.querySelector('#file-16');
|
||||
expect(jpegElement).not.toBeNull();
|
||||
// cspell: disable-next
|
||||
expect(jpegElement.textContent).toBe('Äåéö.jpg');
|
||||
});
|
||||
}));
|
||||
|
@@ -70,7 +70,7 @@ export class WidgetComponent implements AfterViewInit {
|
||||
}
|
||||
|
||||
// Note for developers:
|
||||
// returns <any> object to be able binding it to the <element reguired="required"> attribute
|
||||
// returns <any> object to be able binding it to the <element required="required"> attribute
|
||||
isRequired(): any {
|
||||
if (this.field && this.field.required) {
|
||||
return true;
|
||||
|
@@ -110,8 +110,8 @@ export class EcmModelService {
|
||||
typeCreated => {
|
||||
this.logService.info('type Created', typeCreated);
|
||||
this.addPropertyToAType(EcmModelService.MODEL_NAME, formName, form).subscribe(
|
||||
properyAdded => {
|
||||
this.logService.info('property Added', properyAdded);
|
||||
propertyAdded => {
|
||||
this.logService.info('property Added', propertyAdded);
|
||||
observer.next(typeCreated);
|
||||
observer.complete();
|
||||
},
|
||||
|
@@ -49,7 +49,7 @@ describe('FormRenderingService', () => {
|
||||
expect(type).toBe(UploadWidgetComponent);
|
||||
});
|
||||
|
||||
it('should resolve Uknown widget for unknown field type', () => {
|
||||
it('should resolve Unknown widget for unknown field type', () => {
|
||||
let resolver = service.getComponentTypeResolver('missing-type');
|
||||
let type = resolver(null);
|
||||
expect(type).toBe(UnknownWidgetComponent);
|
||||
|
@@ -328,11 +328,11 @@ describe('Form service', () => {
|
||||
});
|
||||
|
||||
it('should search for Form with modelType=2', (done) => {
|
||||
let response = { data: [{ id: 1, name: 'findme' }, { id: 2, name: 'testform' }] };
|
||||
let response = { data: [{ id: 1, name: 'findMe' }, { id: 2, name: 'testForm' }] };
|
||||
|
||||
service.searchFrom('findme').subscribe(result => {
|
||||
service.searchFrom('findMe').subscribe(result => {
|
||||
expect(jasmine.Ajax.requests.mostRecent().url.endsWith('models?modelType=2')).toBeTruthy();
|
||||
expect(result.name).toEqual('findme');
|
||||
expect(result.name).toEqual('findMe');
|
||||
expect(result.id).toEqual(1);
|
||||
done();
|
||||
});
|
||||
|
@@ -193,7 +193,7 @@ export class FormService {
|
||||
)
|
||||
.pipe(
|
||||
map(function (forms: any) {
|
||||
return forms.data.find(formdata => formdata.name === name);
|
||||
return forms.data.find(formData => formData.name === name);
|
||||
}),
|
||||
catchError(err => this.handleError(err))
|
||||
);
|
||||
@@ -232,7 +232,7 @@ export class FormService {
|
||||
* @param processInstanceId ID of the target process
|
||||
* @returns List of instance variable information
|
||||
*/
|
||||
getProcessVarablesById(processInstanceId: string): Observable<any[]> {
|
||||
getProcessVariablesById(processInstanceId: string): Observable<any[]> {
|
||||
return from(this.processInstanceVariablesApi.getProcessInstanceVariables(processInstanceId))
|
||||
.pipe(
|
||||
map(this.toJson),
|
||||
@@ -363,7 +363,7 @@ export class FormService {
|
||||
* @param processId ID of the process to get
|
||||
* @returns Process instance
|
||||
*/
|
||||
getProcessIntance(processId: string): Observable<any> {
|
||||
getProcessInstance(processId: string): Observable<any> {
|
||||
return from(this.processApi.getProcessInstance(processId))
|
||||
.pipe(
|
||||
map(this.toJson),
|
||||
|
@@ -149,7 +149,7 @@ export class ProcessContentService {
|
||||
* Associates an uploaded file with a process instance.
|
||||
* @param processInstanceId ID of the target process instance
|
||||
* @param content File to associate
|
||||
* @param opts Options supported by JSAPI
|
||||
* @param opts Options supported by JS-API
|
||||
* @returns Details of created content
|
||||
*/
|
||||
createProcessRelatedContent(processInstanceId: string, content: any, opts?: any): Observable<any> {
|
||||
@@ -161,7 +161,7 @@ export class ProcessContentService {
|
||||
* Associates an uploaded file with a task instance.
|
||||
* @param taskId ID of the target task
|
||||
* @param file File to associate
|
||||
* @param opts Options supported by JSAPI
|
||||
* @param opts Options supported by JS-API
|
||||
* @returns Details of created content
|
||||
*/
|
||||
createTaskRelatedContent(taskId: string, file: any, opts?: any) {
|
||||
|
@@ -185,7 +185,7 @@ describe('WidgetVisibilityService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('should retrive the process variables', () => {
|
||||
describe('should retrieve the process variables', () => {
|
||||
let fakeFormWithField = new FormModel(fakeFormJson);
|
||||
let visibilityObjTest: WidgetVisibilityModel;
|
||||
let chainedVisibilityObj = new WidgetVisibilityModel();
|
||||
@@ -528,7 +528,7 @@ describe('WidgetVisibilityService', () => {
|
||||
});
|
||||
|
||||
it('should return undefined for not existing form variable', () => {
|
||||
let varValue = service.getVariableValue(fakeForm, 'MISTERY_FORM_VARIABLE', null);
|
||||
let varValue = service.getVariableValue(fakeForm, 'MYSTERY_FORM_VARIABLE', null);
|
||||
|
||||
expect(varValue).toBeUndefined();
|
||||
});
|
||||
|
@@ -35,9 +35,9 @@ export class LanguageMenuComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
const languagesCongifApp = this.appConfig.get<Array<any>>(AppConfigValues.APP_CONFIG_LANGUAGES_KEY);
|
||||
if (languagesCongifApp) {
|
||||
this.languages = languagesCongifApp;
|
||||
const languagesConfigApp = this.appConfig.get<Array<any>>(AppConfigValues.APP_CONFIG_LANGUAGES_KEY);
|
||||
if (languagesConfigApp) {
|
||||
this.languages = languagesConfigApp;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -143,7 +143,7 @@ describe('HeaderLayoutComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Template tranclusion', () => {
|
||||
describe('Template transclusion', () => {
|
||||
|
||||
@Component({
|
||||
selector: 'adf-test-layout-header',
|
||||
@@ -159,7 +159,7 @@ describe('HeaderLayoutComponent', () => {
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
it('should transclude the provided nodes into the component', () => {
|
||||
it('should project the provided nodes into the component', () => {
|
||||
const hostFixture = TestBed.createComponent(HeaderLayoutTesterComponent);
|
||||
hostFixture.detectChanges();
|
||||
const innerText = hostFixture.nativeElement.querySelector('mat-toolbar>p').innerText;
|
||||
|
@@ -214,7 +214,7 @@ describe('SidenavLayoutComponent', () => {
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should pass through input paramters', () => {
|
||||
it('should pass through input parameters', () => {
|
||||
component.sidenavMin = 1;
|
||||
component.sidenavMax = 2;
|
||||
component.hideSidenav = true;
|
||||
@@ -304,7 +304,7 @@ describe('SidenavLayoutComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should be the same as the expandedSidenav\'s value by default', (done) => {
|
||||
it('should be the same as the expanded Sidenav value by default', (done) => {
|
||||
component.expandedSidenav = false;
|
||||
fixture.detectChanges();
|
||||
|
||||
|
@@ -102,7 +102,7 @@ describe('LoginComponent', () => {
|
||||
fixture.detectChanges();
|
||||
}
|
||||
|
||||
it('should be autocompelete off', () => {
|
||||
it('should be autocomplete off', () => {
|
||||
expect(element.querySelector('#adf-login-form').getAttribute('autocomplete')).toBe('off');
|
||||
});
|
||||
|
||||
@@ -493,7 +493,7 @@ describe('LoginComponent', () => {
|
||||
loginWithCredentials('fake-username-CSRF-error', 'fake-password');
|
||||
}));
|
||||
|
||||
it('should return ECOM read-oly error when error occurs', async(() => {
|
||||
it('should return ECM read-only error when error occurs', async(() => {
|
||||
spyOn(authService, 'login')
|
||||
.and.returnValue(
|
||||
throwError(
|
||||
|
@@ -229,10 +229,6 @@ export class LoginComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performe the login service
|
||||
* @param values
|
||||
*/
|
||||
private performLogin(values: any) {
|
||||
this.actualLoginStep = LoginSteps.Checking;
|
||||
this.authService
|
||||
|
@@ -346,7 +346,7 @@ export let startMockForm = {
|
||||
1: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'billamount',
|
||||
id: 'billAmount',
|
||||
name: 'BillAmount',
|
||||
type: 'integer',
|
||||
value: null,
|
||||
@@ -526,7 +526,7 @@ export let startMockForm = {
|
||||
2: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'hospitalname',
|
||||
id: 'hospitalName',
|
||||
name: 'HospitalName',
|
||||
type: 'text',
|
||||
value: null,
|
||||
@@ -769,7 +769,7 @@ export let startMockFormWithTab = {
|
||||
1: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'billamount',
|
||||
id: 'billAmount',
|
||||
name: 'BillAmount',
|
||||
type: 'integer',
|
||||
value: null,
|
||||
@@ -949,7 +949,7 @@ export let startMockFormWithTab = {
|
||||
2: [
|
||||
{
|
||||
fieldType: 'FormFieldRepresentation',
|
||||
id: 'hospitalname',
|
||||
id: 'hospitalName',
|
||||
name: 'HospitalName',
|
||||
type: 'text',
|
||||
value: null,
|
||||
|
@@ -32,7 +32,7 @@ export * from './alfresco-api.service.mock';
|
||||
export * from './form/form.component.mock';
|
||||
export * from './form/formDefinition.mock';
|
||||
export * from './form/formDefinitionReadonly.mock';
|
||||
export * from './form/formDefinitionVisibiity.mock';
|
||||
export * from './form/formDefinitionVisibility.mock';
|
||||
export * from './form/start-form.component.mock';
|
||||
export * from './form/form.service.mock';
|
||||
export * from './form/widget-visibility.service.mock';
|
||||
|
@@ -15,67 +15,98 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export let fakeRedition = {
|
||||
'entry': {
|
||||
'id': 'pdf',
|
||||
'content': {'mimeType': 'application/pdf', 'mimeTypeName': 'Adobe PDF Document'},
|
||||
'status': 'NOT_CREATED'
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeReditionCreated = {
|
||||
'entry': {
|
||||
'id': 'pdf',
|
||||
'content': {'mimeType': 'application/pdf', 'mimeTypeName': 'Adobe PDF Document'},
|
||||
'status': 'CREATED'
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeReditionsList = {
|
||||
'list': {
|
||||
'pagination': {
|
||||
'count': 6,
|
||||
'hasMoreItems': false,
|
||||
'totalItems': 6,
|
||||
'skipCount': 0,
|
||||
'maxItems': 100
|
||||
export let fakeRendition = {
|
||||
entry: {
|
||||
id: 'pdf',
|
||||
content: {
|
||||
mimeType: 'application/pdf',
|
||||
mimeTypeName: 'Adobe PDF Document'
|
||||
},
|
||||
'entries': [{
|
||||
'entry': {
|
||||
'id': 'avatar',
|
||||
'content': {'mimeType': 'image/png', 'mimeTypeName': 'PNG Image'},
|
||||
'status': 'NOT_CREATED'
|
||||
}
|
||||
}, {
|
||||
'entry': {
|
||||
'id': 'avatar32',
|
||||
'content': {'mimeType': 'image/png', 'mimeTypeName': 'PNG Image'},
|
||||
'status': 'NOT_CREATED'
|
||||
}
|
||||
}, {
|
||||
'entry': {
|
||||
'id': 'doclib',
|
||||
'content': {'mimeType': 'image/png', 'mimeTypeName': 'PNG Image'},
|
||||
'status': 'NOT_CREATED'
|
||||
}
|
||||
}, {
|
||||
'entry': {
|
||||
'id': 'imgpreview',
|
||||
'content': {'mimeType': 'image/jpeg', 'mimeTypeName': 'JPEG Image'},
|
||||
'status': 'NOT_CREATED'
|
||||
}
|
||||
}, {
|
||||
'entry': {
|
||||
'id': 'medium',
|
||||
'content': {'mimeType': 'image/jpeg', 'mimeTypeName': 'JPEG Image'},
|
||||
'status': 'NOT_CREATED'
|
||||
}
|
||||
}, {
|
||||
'entry': {
|
||||
'id': 'pdf',
|
||||
'content': {'mimeType': 'application/pdf', 'mimeTypeName': 'Adobe PDF Document'},
|
||||
'status': 'NOT_CREATED'
|
||||
}
|
||||
}]
|
||||
status: 'NOT_CREATED'
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeRenditionCreated = {
|
||||
entry: {
|
||||
id: 'pdf',
|
||||
content: {
|
||||
mimeType: 'application/pdf',
|
||||
mimeTypeName: 'Adobe PDF Document'
|
||||
},
|
||||
status: 'CREATED'
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeRenditionsList = {
|
||||
list: {
|
||||
pagination: {
|
||||
count: 6,
|
||||
hasMoreItems: false,
|
||||
totalItems: 6,
|
||||
skipCount: 0,
|
||||
maxItems: 100
|
||||
},
|
||||
entries: [
|
||||
{
|
||||
entry: {
|
||||
id: 'avatar',
|
||||
content: {
|
||||
mimeType: 'image/png',
|
||||
mimeTypeName: 'PNG Image'
|
||||
},
|
||||
status: 'NOT_CREATED'
|
||||
}
|
||||
},
|
||||
{
|
||||
entry: {
|
||||
id: 'avatar32',
|
||||
content: {
|
||||
mimeType: 'image/png',
|
||||
mimeTypeName: 'PNG Image'
|
||||
},
|
||||
status: 'NOT_CREATED'
|
||||
}
|
||||
},
|
||||
{
|
||||
entry: {
|
||||
id: 'doclib',
|
||||
content: {
|
||||
mimeType: 'image/png',
|
||||
mimeTypeName: 'PNG Image'
|
||||
},
|
||||
status: 'NOT_CREATED'
|
||||
}
|
||||
},
|
||||
{
|
||||
entry: {
|
||||
id: 'imgpreview',
|
||||
content: {
|
||||
mimeType: 'image/jpeg',
|
||||
mimeTypeName: 'JPEG Image'
|
||||
},
|
||||
status: 'NOT_CREATED'
|
||||
}
|
||||
},
|
||||
{
|
||||
entry: {
|
||||
id: 'medium',
|
||||
content: {
|
||||
mimeType: 'image/jpeg',
|
||||
mimeTypeName: 'JPEG Image'
|
||||
},
|
||||
status: 'NOT_CREATED'
|
||||
}
|
||||
},
|
||||
{
|
||||
entry: {
|
||||
id: 'pdf',
|
||||
content: {
|
||||
mimeType: 'application/pdf',
|
||||
mimeTypeName: 'Adobe PDF Document'
|
||||
},
|
||||
status: 'NOT_CREATED'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* spellchecker: disable */
|
||||
export class PermissionsEnum extends String {
|
||||
static DELETE: string = 'delete';
|
||||
static UPDATE: string = 'update';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user