mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
angular 6 upgrade
This commit is contained in:
@@ -12,7 +12,7 @@ export class PaginatedSearchOptions extends SearchOptions {
|
||||
pagination?: PaginationComponentOptions;
|
||||
sort?: SortOptions;
|
||||
|
||||
constructor(options: {scope?: string, query?: string, dsoType?: DSpaceObjectType, filters?: SearchFilter[], pagination?: PaginationComponentOptions, sort?: SortOptions}) {
|
||||
constructor(options: {scope?: string, query?: string, dsoType?: DSpaceObjectType, filters?: SearchFilter[], fixedFilter?: any, pagination?: PaginationComponentOptions, sort?: SortOptions}) {
|
||||
super(options);
|
||||
this.pagination = options.pagination;
|
||||
this.sort = options.sort;
|
||||
|
@@ -58,7 +58,6 @@ export class SearchFixedFilterService {
|
||||
map((response: FilteredDiscoveryQueryResponse) =>
|
||||
response.filterQuery
|
||||
));
|
||||
|
||||
return filterQuery;
|
||||
}
|
||||
return observableOf(undefined);
|
||||
|
@@ -22,7 +22,6 @@ import { SearchConfigurationService } from './search-service/search-configuratio
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { RouteService } from '../shared/services/route.service';
|
||||
|
||||
describe('SearchPageComponent', () => {
|
||||
let comp: SearchPageComponent;
|
||||
let fixture: ComponentFixture<SearchPageComponent>;
|
||||
let searchServiceObject: SearchService;
|
||||
@@ -201,4 +200,4 @@ describe('SearchPageComponent', () => {
|
||||
});
|
||||
|
||||
});
|
||||
})
|
||||
});
|
||||
|
@@ -204,7 +204,7 @@ describe('MetadataService', () => {
|
||||
undefined,
|
||||
MockItem
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
const mockType = (mockItem: Item, type: string): Item => {
|
||||
const typedMockItem = Object.assign(new Item(), mockItem) as Item;
|
||||
@@ -215,7 +215,7 @@ describe('MetadataService', () => {
|
||||
}
|
||||
}
|
||||
return typedMockItem;
|
||||
}
|
||||
};
|
||||
|
||||
const mockPublisher = (mockItem: Item): Item => {
|
||||
const publishedMockItem = Object.assign(new Item(), mockItem) as Item;
|
||||
|
@@ -1,15 +1,15 @@
|
||||
import { EntityTypeSwitcherComponent } from './entity-type-switcher.component';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { PageInfo } from '../../../core/shared/page-info.model';
|
||||
import { Item } from '../../../core/shared/item.model';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import * as decorator from '../entity-type-decorator';
|
||||
import { ElementViewMode } from '../../view-mode';
|
||||
import { getComponentByEntityType } from '../entity-type-decorator';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { ElementViewMode } from '../../view-mode';
|
||||
import createSpy = jasmine.createSpy;
|
||||
|
||||
const relationType = 'type';
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
@@ -44,7 +44,7 @@ describe('EntityTypeSwitcherComponent', () => {
|
||||
comp = fixture.componentInstance;
|
||||
comp.object = mockItem;
|
||||
comp.viewMode = viewMode;
|
||||
spyOn(decorator, 'getComponentByEntityType').and.returnValue('component');
|
||||
spyOnProperty(decorator, 'getComponentByEntityType').and.returnValue(createSpy('getComponentByEntityType'))
|
||||
}));
|
||||
|
||||
describe('when calling getComponent', () => {
|
||||
|
@@ -1,18 +1,16 @@
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { Observable } from 'rxjs';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { RemoteData } from '../../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../../core/data/paginated-list';
|
||||
import { PageInfo } from '../../../../core/shared/page-info.model';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { ItemSearchResultListElementComponent } from './item-search-result-list-element.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
||||
import { TruncatePipe } from '../../../utils/truncate.pipe';
|
||||
import { createRelationshipsObservable } from '../../../../+item-page/simple/entity-types/shared/entity.component.spec';
|
||||
import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
||||
|
Reference in New Issue
Block a user