mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Create Folder directive enhancement: custom nodeType (#3214)
This commit is contained in:
committed by
Eugenio Romano
parent
0ff0573401
commit
deb09e4d5f
@@ -299,7 +299,30 @@ describe('FolderDialogComponent', () => {
|
||||
properties: {
|
||||
'cm:title': 'folder-name-update',
|
||||
'cm:description': 'folder-description-update'
|
||||
}
|
||||
},
|
||||
nodeType: 'cm:folder'
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
it('should submit updated values if form is valid (with custom nodeType)', () => {
|
||||
spyOn(nodesApi, 'createFolder').and.returnValue(Observable.of({}));
|
||||
|
||||
component.form.controls['name'].setValue('folder-name-update');
|
||||
component.form.controls['description'].setValue('folder-description-update');
|
||||
component.nodeType = 'cm:sushi';
|
||||
|
||||
component.submit();
|
||||
|
||||
expect(nodesApi.createFolder).toHaveBeenCalledWith(
|
||||
'parentNodeId',
|
||||
{
|
||||
name: 'folder-name-update',
|
||||
properties: {
|
||||
'cm:title': 'folder-name-update',
|
||||
'cm:description': 'folder-description-update'
|
||||
},
|
||||
nodeType: 'cm:sushi'
|
||||
}
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user