fix type definition (#2002)

This commit is contained in:
Eugenio Romano
2017-06-22 13:18:10 +02:00
committed by Eugenio Romano
parent 56179c2e88
commit beba80d8e8
50 changed files with 35356 additions and 143 deletions

View File

@@ -41,7 +41,7 @@ describe('AdfCardView', () => {
});
it('should render the label and value', async(() => {
component.properties = [new CardViewModel({label: 'My label', value: 'My value'});
component.properties = [new CardViewModel({label: 'My label', value: 'My value'})];
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();

View File

@@ -17,7 +17,6 @@
import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs/Rx';
import { MinimalNodeEntity } from 'alfresco-js-api';
import { AlfrescoAuthenticationService } from './alfresco-authentication.service';
import { AlfrescoApiService } from './alfresco-api.service';
import { LogService } from './log.service';
@@ -72,15 +71,14 @@ export class AlfrescoContentService {
return dataContent;
})).catch(this.handleError);
}
/**
* 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

@@ -85,7 +85,7 @@ describe('RenditionsService', () => {
describe('convert', () => {
it('should call the server with the ID passed and the asked encoding for creation', (done) => {
service.convert('fake-node-id', 'pdf');
service.convert('fake-node-id', 'pdf', 1000);
expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
expect(jasmine.Ajax.requests.mostRecent().url).toBe('http://localhost:3000/ecm/alfresco/api/-default-/public/alfresco/versions/1/nodes/fake-node-id/renditions');

View File

@@ -76,7 +76,7 @@ export class RenditionsService {
.catch(err => this.handleError(err));
}
convert(nodeId: string, encoding: string, pollingInterval: number|undefined) {
convert(nodeId: string, encoding: string, pollingInterval: number = 1000) {
return this.createRendition(nodeId, encoding)
.concatMap(() => this.pollRendition(nodeId, encoding, pollingInterval));
}