mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[NO-ISSUE] RE enable failing test (#3168)
* restore viewer test * fix content node selector breadcrumb tests * fix skipped test * notification service uncomment test * remove duplicated test exclude dialog test
This commit is contained in:
@@ -786,15 +786,6 @@ describe('DocumentList', () => {
|
||||
expect(documentList.navigationMode).toBe(DocumentListComponent.SINGLE_CLICK_NAVIGATION);
|
||||
});
|
||||
|
||||
xit('should emit error on wrong folder id', (done) => {
|
||||
documentList.error.subscribe(() => {
|
||||
done();
|
||||
});
|
||||
|
||||
documentList.currentFolderId = 'wrong-id';
|
||||
documentList.ngOnChanges({ currentFolderId: new SimpleChange(null, documentList.currentFolderId, true) });
|
||||
});
|
||||
|
||||
it('should require dataTable to check empty template', () => {
|
||||
documentList.dataTable = null;
|
||||
expect(documentList.isEmptyTemplateDefined()).toBeFalsy();
|
||||
|
@@ -116,7 +116,7 @@ describe('DocumentListService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
xit('should emit an error when the folder already exist', () => {
|
||||
it('should emit an error when the folder already exist', () => {
|
||||
service.createFolder('fake-name', 'fake-path').subscribe(
|
||||
res => {
|
||||
|
||||
|
@@ -21,7 +21,6 @@ import {
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Response } from '@angular/http';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/throw';
|
||||
@@ -109,8 +108,9 @@ export class DocumentListService {
|
||||
* @returns Details of the created folder node
|
||||
*/
|
||||
createFolder(name: string, parentId: string): Observable<MinimalNodeEntity> {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.createFolder(name, '/', parentId))
|
||||
.catch(err => this.handleError(err));
|
||||
let observable = Observable.fromPromise(this.apiService.getInstance().nodes.createFolder(name, '/', parentId));
|
||||
observable.catch(err => this.handleError(err));
|
||||
return observable;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,7 +182,7 @@ export class DocumentListService {
|
||||
return this.contentService.hasPermission(node, permission);
|
||||
}
|
||||
|
||||
private handleError(error: Response) {
|
||||
private handleError(error: any) {
|
||||
// in a real world app, we may send the error to some remote logging infrastructure
|
||||
// instead of just logging it to the console
|
||||
this.logService.error(error);
|
||||
|
Reference in New Issue
Block a user