mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-838]Add a method to wait until datatable contains less then a specific nr… (#5370)
* Add a method to wait until datatable contains less then a specific nr of rows. This could be useful for waiting for datatable to load when searching or filtering it * Moved the method to pagination page * Renamed the method
This commit is contained in:
committed by
Eugenio Romano
parent
b931c4a85c
commit
fd74811639
@@ -120,4 +120,17 @@ export class PaginationPage {
|
|||||||
const totalNumberOfFiles = await BrowserActions.getText(this.totalFiles);
|
const totalNumberOfFiles = await BrowserActions.getText(this.totalFiles);
|
||||||
return totalNumberOfFiles.split('of ')[1];
|
return totalNumberOfFiles.split('of ')[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getNumberOfAllRows(): Promise<number> {
|
||||||
|
return +this.getTotalNumberOfFiles();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Wait until the total number of items is less then specified value
|
||||||
|
*/
|
||||||
|
async waitUntilNoOfItemsIsLessThenValue(expectedValue: number): Promise<any> {
|
||||||
|
await BrowserVisibility.waitUntilElementIsVisible(this.totalFiles);
|
||||||
|
const condition = () => this.totalFiles.getText().then(value => value && +value.split('of ')[1] < expectedValue);
|
||||||
|
return browser.wait(condition, 10000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user