[ACS-6563] cleanup protractor configs and e2e for extensibility (#3591)

* cleanup extensibility configs and protractor e2e

* cleanup

* cleanup
This commit is contained in:
Denys Vuika
2024-01-10 09:09:11 -05:00
committed by GitHub
parent 58070d9666
commit 09aba59b06
45 changed files with 36 additions and 12837 deletions

View File

@@ -22,8 +22,6 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { browser } from 'protractor';
import { BrowserActions, Logger } from '@alfresco/adf-testing';
import { Menu } from '../menu/menu';
import { Component } from '../component';
@@ -34,8 +32,6 @@ export class Pagination extends Component {
totalPages = this.byCss('.adf-pagination__total-pages');
previousButton = this.byCss('.adf-pagination__previous-button');
nextButton = this.byCss('.adf-pagination__next-button');
maxItemsButton = this.byCss('.adf-pagination__max-items + button[mat-icon-button]');
pagesButton = this.byCss('.adf-pagination__current-page + button[mat-icon-button]');
menu: Menu = new Menu();
@@ -43,64 +39,6 @@ export class Pagination extends Component {
super('adf-pagination', ancestor);
}
async openMaxItemsMenu() {
try {
await BrowserActions.click(this.maxItemsButton);
await this.menu.waitForMenuToOpen();
} catch (error) {
Logger.error('____ open max items catch ___', error);
}
}
async openCurrentPageMenu() {
try {
await BrowserActions.click(this.pagesButton);
await this.menu.waitForMenuToOpen();
} catch (error) {
Logger.error('____ open current page menu ___', error);
}
}
async resetToDefaultPageSize() {
try {
await this.openMaxItemsMenu();
await this.menu.clickNthItem(1);
await this.menu.waitForMenuToClose();
} catch (error) {
Logger.error('___ reset to default page size catch ___', error);
}
}
async resetToDefaultPageNumber() {
try {
await this.openCurrentPageMenu();
await this.menu.clickNthItem(1);
await this.menu.waitForMenuToClose();
} catch (error) {
Logger.error('____ reset to default page number catch ___', error);
}
}
async clickNext() {
await BrowserActions.click(this.nextButton);
}
async clickPrevious() {
await BrowserActions.click(this.previousButton);
}
async isNextEnabled() {
return this.nextButton.isEnabled();
}
async isPreviousEnabled() {
return this.previousButton.isEnabled();
}
async isPagesButtonPresent() {
return browser.isElementPresent(this.pagesButton);
}
async isRangePresent() {
return this.range.isPresent();
}
@@ -125,19 +63,7 @@ export class Pagination extends Component {
return this.nextButton.isPresent();
}
async getCurrentPage() {
return this.currentPage.getText();
}
async getRange() {
return this.range.getText();
}
async getMaxItems() {
return this.maxItems.getText();
}
async getTotalPages() {
return this.totalPages.getText();
}
}