[ADF-2629] Fix infinite pagination and e2e parallel task (#3691)

* change infinite pagination logic
make merge in share adapter a real merge

* missing semi column

* type problem

* fix pagination infinite test

* tentative file detector

* add other remote files for webdriver

* parallel execution test

* fix refresh browser e2e

* missing driver remote in util
This commit is contained in:
Eugenio Romano
2018-08-13 02:27:38 +01:00
committed by Eugenio Romano
parent 2602879cba
commit 83b2857097
19 changed files with 2866 additions and 2856 deletions

View File

@@ -27,6 +27,7 @@ import { Pagination } from 'alfresco-js-api';
import { Subscription } from 'rxjs';
import { PaginationComponentInterface } from './pagination-component.interface';
import { PaginationModel } from '../models/pagination.model';
import { UserPreferencesService } from '../services/user-preferences.service';
@Component({
selector: 'adf-infinite-pagination',
@@ -68,7 +69,7 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio
private paginationSubscription: Subscription;
constructor(private cdr: ChangeDetectorRef) {
constructor(private cdr: ChangeDetectorRef, private userPreferencesService: UserPreferencesService) {
}
ngOnInit() {
@@ -76,7 +77,7 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio
this.paginationSubscription = this.target.pagination.subscribe(pagination => {
this.isLoading = false;
this.pagination = pagination;
this.pageSize = pagination.maxItems;
this.pageSize = this.userPreferencesService.paginationSize || this.pageSize;
this.cdr.detectChanges();
});
}
@@ -87,12 +88,12 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio
}
onLoadMore() {
this.pagination.skipCount += this.pageSize;
this.pagination.skipCount = this.pagination.skipCount;
this.pagination.skipCount = 0;
this.pagination.maxItems = this.pagination.maxItems + this.pageSize;
this.pagination.merge = true;
this.loadMore.next(this.pagination);
if ((this.pagination.skipCount + this.pageSize) > this.pagination.totalItems) {
if (this.pagination.maxItems >= this.pagination.totalItems) {
this.pagination.hasMoreItems = false;
}