fix type definition (#2002)

This commit is contained in:
Eugenio Romano 2017-06-22 13:18:10 +02:00
parent 375c014f82
commit 8dc2fe2979
4 changed files with 16 additions and 12 deletions

View File

@ -1845,6 +1845,12 @@
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
"dev": true
},
"fork-ts-checker-webpack-plugin": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-0.2.3.tgz",
"integrity": "sha1-dEk9mqC3yNWiBvlz5cCe7sfnL44=",
"dev": true
},
"form-data": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.2.0.tgz",

View File

@ -41,7 +41,7 @@ describe('Activiti Task Create Attachment', () => {
ActivitiCreateTaskAttachmentComponent
],
providers: [
{ provide: AlfrescoTranslationService },
{provide: AlfrescoTranslationService},
ActivitiContentService
]
}).compileComponents();
@ -55,7 +55,7 @@ describe('Activiti Task Create Attachment', () => {
createTaskRelatedContentSpy = spyOn(service, 'createTaskRelatedContent').and.returnValue(Observable.of(
{
status: true
status: true
}));
componentHandler = jasmine.createSpyObj('componentHandler', [
@ -67,17 +67,16 @@ describe('Activiti Task Create Attachment', () => {
it('should not call createTaskRelatedContent service when taskId changed', () => {
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({ 'taskId': change });
component.ngOnChanges({'taskId': change});
expect(createTaskRelatedContentSpy).not.toHaveBeenCalled();
});
it('should not call createTaskRelatedContent service when there is no file uploaded', () => {
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({ 'taskId': change });
let customEvent = {
component.ngOnChanges({'taskId': change});
let customEvent: any = {
detail: {
files: [
]
files: []
}
};
component.onFileUpload(customEvent);
@ -86,7 +85,7 @@ describe('Activiti Task Create Attachment', () => {
it('should call createTaskRelatedContent service when there is a file uploaded', () => {
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({ 'taskId': change });
component.ngOnChanges({'taskId': change});
let file = new File([new Blob()], 'Test');
let customEvent = {
detail: {

View File

@ -92,10 +92,10 @@ export class AlfrescoContentService {
* Create a folder
* @param name - the folder name
*/
createFolder(relativePath: string, name: string, parentId?: string): Observable<MinimalNodeEntity> {
createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent> {
return Observable.fromPromise(this.apiService.getInstance().nodes.createFolder(name, relativePath, parentId))
.do(data => {
this.folderCreated.next({
this.folderCreated.next(<FolderCreatedEvent>{
relativePath: relativePath,
name: name,
parentId: parentId,

View File

@ -1816,8 +1816,7 @@
"es5-ext": {
"version": "0.10.23",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.23.tgz",
"integrity": "sha1-dXi1G+l0IHpUh4IbVlOMIk5Oezg=",
"dev": true
"integrity": "sha1-dXi1G+l0IHpUh4IbVlOMIk5Oezg="
},
"es6-iterator": {
"version": "2.0.1",