[ADF-3438] Task List Demo - created date filter and pagination (#3782)

* date filter and pagination

* remove wrong mat-form-field
This commit is contained in:
bbcodrin
2018-09-14 18:55:57 +03:00
committed by Eugenio Romano
parent c445066516
commit 73a5eddebd
8 changed files with 153 additions and 72 deletions

View File

@@ -265,7 +265,7 @@ describe('PaginationComponent', () => {
component.ngOnInit();
customComponent.pagination.next(pagination);
expect(component.pagination).toBe(pagination);
expect(component.pagination).toEqual(pagination);
});
it('should update pagination by subscription', () => {
@@ -280,17 +280,18 @@ describe('PaginationComponent', () => {
component.ngOnInit();
customComponent.pagination.next(pagination1);
expect(component.pagination).toBe(pagination1);
expect(component.pagination).toEqual(pagination1);
customComponent.pagination.next(pagination2);
expect(component.pagination).toBe(pagination2);
expect(component.pagination).toEqual(pagination2);
});
it('should send pagination event to paginated component', () => {
const customComponent = <PaginatedComponent> {
pagination: new BehaviorSubject<Pagination>({}),
updatePagination() {},
supportedPageSizes: []
supportedPageSizes: [],
rows: []
};
spyOn(customComponent, 'updatePagination').and.stub();
@@ -308,7 +309,8 @@ describe('PaginationComponent', () => {
it('should go to previous page if current page has 0 items', () => {
const customComponent = <PaginatedComponent> {
updatePagination() {},
pagination: new BehaviorSubject<Pagination>({})
pagination: new BehaviorSubject<Pagination>({}),
rows: []
};
component.target = customComponent;