diff --git a/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.spec.ts b/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.spec.ts index a3efc2ebc5..0c985e37f9 100644 --- a/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.spec.ts +++ b/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.spec.ts @@ -3,15 +3,14 @@ import {TranslateModule} from '@ngx-translate/core'; import {NO_ERRORS_SCHEMA} from '@angular/core'; import {CommunityPageSubCommunityListComponent} from './community-page-sub-community-list.component'; import {Community} from '../../core/shared/community.model'; -import {Observable} from 'rxjs/Observable'; import {RemoteData} from '../../core/data/remote-data'; import {PaginatedList} from '../../core/data/paginated-list'; -import 'rxjs/add/observable/of'; import {PageInfo} from '../../core/shared/page-info.model'; import {SharedModule} from '../../shared/shared.module'; import {RouterTestingModule} from '@angular/router/testing'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; import {By} from '@angular/platform-browser'; +import {of as observableOf, Observable } from 'rxjs'; describe('SubCommunityList Component', () => { let comp: CommunityPageSubCommunityListComponent; @@ -46,7 +45,7 @@ describe('SubCommunityList Component', () => { language: 'en_US', value: 'Test title' }], - subcommunities: Observable.of(new RemoteData(true, true, true, + subcommunities: observableOf(new RemoteData(true, true, true, undefined, new PaginatedList(new PageInfo(), []))) }); @@ -57,7 +56,7 @@ describe('SubCommunityList Component', () => { language: 'en_US', value: 'Test title' }], - subcommunities: Observable.of(new RemoteData(true, true, true, + subcommunities: observableOf(new RemoteData(true, true, true, undefined, new PaginatedList(new PageInfo(), subcommunities))) }) ; diff --git a/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.ts b/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.ts index e4914d4ab4..91f6d7bac1 100644 --- a/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.ts +++ b/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.ts @@ -1,11 +1,11 @@ import { Component, Input, OnInit } from '@angular/core'; -import { Observable } from 'rxjs/Observable'; import { RemoteData } from '../../core/data/remote-data'; import { Community } from '../../core/shared/community.model'; import { fadeIn } from '../../shared/animations/fade'; import { PaginatedList } from '../../core/data/paginated-list'; +import {Observable} from 'rxjs'; @Component({ selector: 'ds-community-page-sub-community-list', @@ -13,7 +13,9 @@ import { PaginatedList } from '../../core/data/paginated-list'; templateUrl: './community-page-sub-community-list.component.html', animations:[fadeIn] }) - +/** + * Component to render the sub-communities of a Community + */ export class CommunityPageSubCommunityListComponent implements OnInit { @Input() community: Community; subCommunitiesRDObs: Observable>>;