update to latest ADF 2.0 alpha (#93)

* update to latest ADF 2.0 alpha

* test fixes

* remove fdescribe
This commit is contained in:
Denys Vuika
2017-11-28 08:10:33 +00:00
committed by Cilibiu Bogdan
parent 6dbaf63dab
commit ce19f4f40d
12 changed files with 51 additions and 47 deletions

View File

@@ -21,6 +21,7 @@ import { TestBed, async } from '@angular/core/testing';
import { Observable } from 'rxjs/Rx';
import { CoreModule , NodesApiService, AlfrescoApiService} from '@alfresco/adf-core';
import { ShareDataTableAdapter } from '@alfresco/adf-content-services';
import { CommonModule } from '../../common/common.module';
import { LibrariesComponent } from './libraries.component';
@@ -101,30 +102,22 @@ describe('Libraries Routed Component', () => {
it('sets title with id when duplicate nodes title exists in list', () => {
node.title = 'title';
component.documentList.data = {
page: {
list: {
entries: [<any>{ entry: { id: 'some-id', title: 'title' } }]
}
}
};
const data = new ShareDataTableAdapter(null);
data.setRows([<any>{ node: { entry: { id: 'some-id', title: 'title' } } }]);
component.documentList.data = data;
const title = component.makeLibraryTitle(node);
expect(title).toContain('nodeId');
});
it('sets title when no duplicate nodes title exists in list', () => {
node.title = 'title';
component.documentList.data = {
page: {
list: {
entries: [<any>{ entry: { id: 'some-id', title: 'title-some-id' } }]
}
}
};
const data = new ShareDataTableAdapter(null);
data.setRows([<any>{ node: { entry: { id: 'some-id', title: 'title-some-id' } } }]);
component.documentList.data = data;
const title = component.makeLibraryTitle(node);
expect(title).toBe('title');