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=", "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
"dev": true "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": { "form-data": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.2.0.tgz", "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 ActivitiCreateTaskAttachmentComponent
], ],
providers: [ providers: [
{ provide: AlfrescoTranslationService }, {provide: AlfrescoTranslationService},
ActivitiContentService ActivitiContentService
] ]
}).compileComponents(); }).compileComponents();
@ -55,7 +55,7 @@ describe('Activiti Task Create Attachment', () => {
createTaskRelatedContentSpy = spyOn(service, 'createTaskRelatedContent').and.returnValue(Observable.of( createTaskRelatedContentSpy = spyOn(service, 'createTaskRelatedContent').and.returnValue(Observable.of(
{ {
status: true status: true
})); }));
componentHandler = jasmine.createSpyObj('componentHandler', [ componentHandler = jasmine.createSpyObj('componentHandler', [
@ -67,17 +67,16 @@ describe('Activiti Task Create Attachment', () => {
it('should not call createTaskRelatedContent service when taskId changed', () => { it('should not call createTaskRelatedContent service when taskId changed', () => {
let change = new SimpleChange(null, '123', true); let change = new SimpleChange(null, '123', true);
component.ngOnChanges({ 'taskId': change }); component.ngOnChanges({'taskId': change});
expect(createTaskRelatedContentSpy).not.toHaveBeenCalled(); expect(createTaskRelatedContentSpy).not.toHaveBeenCalled();
}); });
it('should not call createTaskRelatedContent service when there is no file uploaded', () => { it('should not call createTaskRelatedContent service when there is no file uploaded', () => {
let change = new SimpleChange(null, '123', true); let change = new SimpleChange(null, '123', true);
component.ngOnChanges({ 'taskId': change }); component.ngOnChanges({'taskId': change});
let customEvent = { let customEvent: any = {
detail: { detail: {
files: [ files: []
]
} }
}; };
component.onFileUpload(customEvent); component.onFileUpload(customEvent);
@ -86,7 +85,7 @@ describe('Activiti Task Create Attachment', () => {
it('should call createTaskRelatedContent service when there is a file uploaded', () => { it('should call createTaskRelatedContent service when there is a file uploaded', () => {
let change = new SimpleChange(null, '123', true); let change = new SimpleChange(null, '123', true);
component.ngOnChanges({ 'taskId': change }); component.ngOnChanges({'taskId': change});
let file = new File([new Blob()], 'Test'); let file = new File([new Blob()], 'Test');
let customEvent = { let customEvent = {
detail: { detail: {

View File

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

View File

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