mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix eslint warnigs for core project (#7506)
This commit is contained in:
@@ -37,7 +37,7 @@ class TestPaginatedComponent implements PaginatedComponent {
|
||||
|
||||
get pagination(): BehaviorSubject<PaginationModel> {
|
||||
if (!this._pagination) {
|
||||
const defaultPagination = <PaginationModel> {
|
||||
const defaultPagination = {
|
||||
maxItems: 10,
|
||||
skipCount: 0,
|
||||
totalItems: 0,
|
||||
|
@@ -34,7 +34,7 @@ import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-infinite-pagination',
|
||||
host: { 'class': 'infinite-adf-pagination' },
|
||||
host: { class: 'infinite-adf-pagination' },
|
||||
templateUrl: './infinite-pagination.component.html',
|
||||
styleUrls: ['./infinite-pagination.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
@@ -118,7 +118,7 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio
|
||||
|
||||
if (this._target) {
|
||||
this.isLoading = true;
|
||||
this._target.updatePagination(<RequestPaginationModel> this.requestPaginationModel);
|
||||
this._target.updatePagination(this.requestPaginationModel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -260,9 +260,9 @@ describe('PaginationComponent', () => {
|
||||
it('should take pagination from the external component', () => {
|
||||
const pagination: Pagination = {};
|
||||
|
||||
const customComponent = <PaginatedComponent> {
|
||||
const customComponent = {
|
||||
pagination: new BehaviorSubject<Pagination>({})
|
||||
};
|
||||
} as PaginatedComponent;
|
||||
|
||||
component.target = customComponent;
|
||||
component.ngOnInit();
|
||||
@@ -275,9 +275,9 @@ describe('PaginationComponent', () => {
|
||||
const pagination1: Pagination = {};
|
||||
const pagination2: Pagination = {};
|
||||
|
||||
const customComponent = <PaginatedComponent> {
|
||||
const customComponent = {
|
||||
pagination: new BehaviorSubject<Pagination>({})
|
||||
};
|
||||
} as PaginatedComponent;
|
||||
|
||||
component.target = customComponent;
|
||||
component.ngOnInit();
|
||||
@@ -290,12 +290,12 @@ describe('PaginationComponent', () => {
|
||||
});
|
||||
|
||||
it('should send pagination event to paginated component', () => {
|
||||
const customComponent = <PaginatedComponent> {
|
||||
const customComponent = {
|
||||
pagination: new BehaviorSubject<Pagination>({}),
|
||||
updatePagination() {},
|
||||
updatePagination: () => {},
|
||||
supportedPageSizes: [],
|
||||
rows: []
|
||||
};
|
||||
} as PaginatedComponent;
|
||||
spyOn(customComponent, 'updatePagination').and.stub();
|
||||
|
||||
component.target = customComponent;
|
||||
@@ -310,11 +310,11 @@ describe('PaginationComponent', () => {
|
||||
});
|
||||
|
||||
it('should go to previous page if current page has 0 items', () => {
|
||||
const customComponent = <PaginatedComponent> {
|
||||
updatePagination() {},
|
||||
const customComponent = {
|
||||
updatePagination: () => {},
|
||||
pagination: new BehaviorSubject<Pagination>({}),
|
||||
rows: []
|
||||
};
|
||||
} as PaginatedComponent;
|
||||
|
||||
component.target = customComponent;
|
||||
component.ngOnInit();
|
||||
@@ -338,9 +338,9 @@ describe('PaginationComponent', () => {
|
||||
|
||||
it('should not show pagination when external component count is zero', () => {
|
||||
const pagination: Pagination = {};
|
||||
const customComponent = <PaginatedComponent> {
|
||||
const customComponent = {
|
||||
pagination: new BehaviorSubject<Pagination>({ count: 0, maxItems: 5, totalItems: 5 })
|
||||
};
|
||||
} as PaginatedComponent;
|
||||
component.target = customComponent;
|
||||
component.ngOnInit();
|
||||
customComponent.pagination.next(pagination);
|
||||
|
Reference in New Issue
Block a user