mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53:03 +00:00
Cache redesign part 1, and add support for alternative links
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||
import { PageInfo } from '../../../core/shared/page-info.model';
|
||||
import { PaginationComponentOptions } from '../../pagination/pagination-component-options.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { SharedModule } from '../../shared.module';
|
||||
@@ -14,7 +11,8 @@ import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { CollectionSelectComponent } from './collection-select.component';
|
||||
import { Collection } from '../../../core/shared/collection.model';
|
||||
import { of } from 'rxjs/internal/observable/of';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils';
|
||||
import { createPaginatedList } from '../../testing/utils.test';
|
||||
|
||||
describe('CollectionSelectComponent', () => {
|
||||
let comp: CollectionSelectComponent;
|
||||
@@ -31,7 +29,7 @@ describe('CollectionSelectComponent', () => {
|
||||
name: 'name2'
|
||||
})
|
||||
];
|
||||
const mockCollections = of(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), mockCollectionList)));
|
||||
const mockCollections = createSuccessfulRemoteDataObject$(createPaginatedList(mockCollectionList));
|
||||
const mockPaginationOptions = Object.assign(new PaginationComponentOptions(), {
|
||||
id: 'search-page-configuration',
|
||||
pageSize: 10,
|
||||
|
@@ -1,10 +1,7 @@
|
||||
import { ItemSelectComponent } from './item-select.component';
|
||||
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { Item } from '../../../core/shared/item.model';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||
import { PageInfo } from '../../../core/shared/page-info.model';
|
||||
import { PaginationComponentOptions } from '../../pagination/pagination-component-options.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { SharedModule } from '../../shared.module';
|
||||
@@ -15,6 +12,8 @@ import { HostWindowServiceStub } from '../../testing/host-window-service.stub';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { of } from 'rxjs/internal/observable/of';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils';
|
||||
import { createPaginatedList } from '../../testing/utils.test';
|
||||
|
||||
describe('ItemSelectComponent', () => {
|
||||
let comp: ItemSelectComponent;
|
||||
@@ -53,7 +52,7 @@ describe('ItemSelectComponent', () => {
|
||||
}]
|
||||
})
|
||||
];
|
||||
const mockItems = of(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), mockItemList)));
|
||||
const mockItems = createSuccessfulRemoteDataObject$(createPaginatedList(mockItemList));
|
||||
const mockPaginationOptions = Object.assign(new PaginationComponentOptions(), {
|
||||
id: 'search-page-configuration',
|
||||
pageSize: 10,
|
||||
|
@@ -2,7 +2,7 @@ import { EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { take } from 'rxjs/operators';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list.model';
|
||||
import { PaginationComponentOptions } from '../../pagination/pagination-component-options.model';
|
||||
import { ObjectSelectService } from '../object-select.service';
|
||||
import { SortOptions } from '../../../core/cache/models/sort-options.model';
|
||||
|
Reference in New Issue
Block a user