mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
[ADF-3569] Add tests for task list demo page: (#3810)
* [ADF-3438] Add tests for task list demo page: * Fixing some tests * Added new tests * Add more tests * Fix the name of the test for bamboo * Fix test name to work on bamboo * no message * Added new tests * Modified the error message. * no message * fix lint issues * Fix lint issues * Changing taskListSinglePage from js to ts * Uncomment a test * Fixing lint issues * Solve lint error * Refactored taskListDemoPage * Commented two tests that are failing because of a bug in APS * Fix lint error * Resolved comments
This commit is contained in:
committed by
Eugenio Romano
parent
002998b10e
commit
2e8d998853
@@ -21,6 +21,7 @@ var PaginationPage = function () {
|
||||
|
||||
var itemsPerPageDropdown = element(by.css("div[class*='adf-pagination__perpage-block'] button"));
|
||||
var pageSelectorDropDown = element(by.css("div[class*='adf-pagination__page-selector']"));
|
||||
var pageSelectorArrow = element(by.css("button[aria-label='Current page selector']"));
|
||||
var itemsPerPage = element(by.css("span[class='adf-pagination__max-items']"));
|
||||
var currentPage = element(by.css("span[class='adf-pagination__current-page']"));
|
||||
var totalPages = element(by.css("span[class='adf-pagination__total-pages']"));
|
||||
@@ -32,7 +33,7 @@ var PaginationPage = function () {
|
||||
var pageDropDown = element(by.css("div[class*='adf-pagination__actualinfo-block'] button"));
|
||||
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 paginationSectionEmpty = element(by.css("adf-pagination[class*='adf-pagination__empty']"));
|
||||
var totalFiles = element(by.css('span[class="adf-pagination__range"]'));
|
||||
|
||||
this.selectItemsPerPage = function (item) {
|
||||
@@ -53,6 +54,14 @@ var PaginationPage = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
this.checkPageSelectorIsNotDisplayed = function() {
|
||||
Util.waitUntilElementIsNotOnPage(pageSelectorArrow);
|
||||
};
|
||||
|
||||
this.checkPageSelectorIsDisplayed = function() {
|
||||
Util.waitUntilElementIsVisible(pageSelectorArrow);
|
||||
};
|
||||
|
||||
this.checkPaginationIsNotDisplayed = function () {
|
||||
Util.waitUntilElementIsOnPage(paginationSectionEmpty);
|
||||
return this;
|
||||
@@ -82,6 +91,11 @@ var PaginationPage = function () {
|
||||
this.clickOnNextPage = function () {
|
||||
Util.waitUntilElementIsVisible(nextPageButton);
|
||||
Util.waitUntilElementIsClickable(nextPageButton);
|
||||
browser.actions().mouseMove(nextPageButton).perform();
|
||||
Util.waitUntilElementIsVisible(nextPageButton);
|
||||
Util.waitUntilElementIsClickable(nextPageButton).then(()=> {
|
||||
browser.driver.sleep(2000);
|
||||
});
|
||||
return nextPageButton.click();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user