76654: Implement feedback

This commit is contained in:
Yana De Pauw
2021-03-29 15:31:27 +02:00
parent 659117dfbd
commit afe345ebac
47 changed files with 203 additions and 431 deletions

View File

@@ -0,0 +1,25 @@
import { of as observableOf } from 'rxjs';
import { PaginationComponentOptions } from '../pagination/pagination-component-options.model';
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
import { FindListOptions } from '../../core/data/request.models';
export class PaginationServiceStub {
constructor(
public pagination = Object.assign(new PaginationComponentOptions(), {currentPage: 1, pageSize: 20}),
public sort = new SortOptions('score', SortDirection.DESC),
public findlistOptions = Object.assign(new FindListOptions(), {currentPage: 1, elementsPerPage: 20}),
) {
}
getCurrentPagination = jasmine.createSpy('getCurrentPagination').and.returnValue(observableOf(this.pagination));
getCurrentSort = jasmine.createSpy('getCurrentSort').and.returnValue(observableOf(this.sort));
getFindListOptions = jasmine.createSpy('getFindListOptions').and.returnValue(observableOf(this.findlistOptions));
resetPage = jasmine.createSpy('resetPage');
updateRoute = jasmine.createSpy('updateRoute');
updateRouteWithUrl = jasmine.createSpy('updateRouteWithUrl');
clearPagination = jasmine.createSpy('clearPagination');
getRouteParameterValue = jasmine.createSpy('getRouteParameterValue').and.returnValue(observableOf(''));
getPageParam = jasmine.createSpy('getPageParam').and.returnValue(`p.${this.pagination.id}`);
}