mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
[ADF-3774]Add process custom filter tests (#4085)
* Add process custom filter tests * Modified getAllRowsNameColumn datatable method.
This commit is contained in:
committed by
Eugenio Romano
parent
a9e5c9b77e
commit
261eeae6f4
@@ -51,25 +51,14 @@ export class DataTablePage {
|
||||
}
|
||||
|
||||
getAllRowsNameColumn() {
|
||||
return this.getAllRowsColumnValues(this.nameColumn);
|
||||
return this.getAllRowsColumnValues('Name');
|
||||
}
|
||||
|
||||
getAllRowsColumnValues(locator) {
|
||||
let deferred = protractor.promise.defer();
|
||||
Util.waitUntilElementIsVisible(element.all(locator).first());
|
||||
let initialList = [];
|
||||
|
||||
element.all(locator).each(function (currentElement) {
|
||||
currentElement.getText().then(function (text) {
|
||||
if (text !== '') {
|
||||
initialList.push(text);
|
||||
}
|
||||
});
|
||||
}).then(function () {
|
||||
deferred.fulfill(initialList);
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
async getAllRowsColumnValues(locator) {
|
||||
let columnLocator = by.css("adf-datatable div[class*='adf-datatable-body'] div[class*='adf-datatable-row'] div[title='" + column + "'] span");
|
||||
Util.waitUntilElementIsVisible(element.all(columnLocator).first());
|
||||
let initialList = await element.all(columnLocator).getText();
|
||||
return initialList.filter((el) => el);
|
||||
}
|
||||
|
||||
getRowByRowNumber(rowNumber) {
|
||||
|
Reference in New Issue
Block a user