[ADF-3696] Create an automated test to cover the search filter buckets scenario (#3915)

* [ADF-3696] Create an automated test to cover the search filter buckets

* Removing comments

* Removing spaces and xit

* Minor changes

* Add spaces where needed

* Changing locator

* Changes on the splitting of names

* Changing to single quotes
This commit is contained in:
jdosti
2018-10-29 15:52:35 +00:00
committed by Eugenio Romano
parent a358a81132
commit baf6050111
4 changed files with 67 additions and 2 deletions

View File

@@ -33,6 +33,7 @@ var PaginationPage = function () {
var pageDropDownOptions = by.css("div[class*='mat-menu-content'] button");
var paginationSection = element(by.css("adf-pagination"));
var paginationSectionEmpty = element(by.css("adf-pagination[class*='adf-pagination__empty ng-star-inserted']"));
var totalFiles = element(by.css('span[class="adf-pagination__range"]'));
this.selectItemsPerPage = function (item) {
Util.waitUntilElementIsVisible(itemsPerPageDropdown);
@@ -130,6 +131,16 @@ var PaginationPage = function () {
Util.waitUntilElementIsNotOnPage(previousButtonDisabled);
};
this.getTotalNumberOfFiles = function () {
Util.waitUntilElementIsVisible(totalFiles);
var numberOfFiles = totalFiles.getText().then(function (totalNumber) {
var totalNumberOfFiles = totalNumber.split('of ')[1];
return totalNumberOfFiles;
});
return numberOfFiles;
}
};
module.exports = PaginationPage;