mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix type definition (#2002)
This commit is contained in:
committed by
Eugenio Romano
parent
56179c2e88
commit
beba80d8e8
@@ -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();
|
||||
|
@@ -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,
|
||||
|
@@ -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');
|
||||
|
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user